-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addresses admonition accessibility issue #2928
Addresses admonition accessibility issue #2928
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## develop #2928 +/- ##
===========================================
- Coverage 93.41% 93.30% -0.12%
===========================================
Files 63 64 +1
Lines 13561 13589 +28
===========================================
+ Hits 12668 12679 +11
- Misses 893 910 +17
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that we aren't missing a clever way to configure the HTML tag for admonition headings in docutils, this does seem like the best way to do this. Two small comments/questions from me, but otherwise this looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me, four days ago:
Assuming that we aren't missing a clever way to configure the HTML tag for admonition headings in docutils
Thanks for finding this alternative approach and proving my assumption wrong! This is much better.
One small comment regarding an unlikely but possible failure mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some notes on doc strings. Not blockers though.
Thanks for the feedback! I addressed all issues/suggestions in the most recent commit. Lmk if there is anything I missed or something else you'd like to see in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* release-1.29.133: Bumping version to 1.29.133 Update to latest partitions and endpoints Update to latest models Update black formatting Include params set in provide-client-param event handlers in dynamic context params for endpoint resolution (#2920) Addresses admonition accessibility issue (#2928) Update pre-commit hooks versions
Overview
This PR addresses an accessibility issue related to the titles of what sphinx calls paragraph-level directives (also know as notes/warnings/admonitions). This currently generates both the title and message content using the HTML
<p>
tag. This causes issues in the following categories:Solution
By inheriting from the sphinx HTML5Translator class, we can define a custom translator that takes uses
<h3>
tags where we want.Cases:
<h3>
for the title instead of the default<p>
.Without customization, a
.. note::
generates something like:After the customization we get something like
Results
Before:
After:
Corresponding HTML:
Additional Note
Custom CSS was applied to make the change function correctly.
References
https://usability.yale.edu/web-accessibility/articles/headings