-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Use <details> instead of roll-your-own content hiding #12212
Comments
Even using a |
Related to the |
@fluffy-critter Can you (or someone else) update this issue with the actual, practical accessibility benefits using In particular, as far as trade-offs go, is it possible to keep details collapsed/expanded state in sync across multiple different DOM elements, the way our current content warnings work? (If a status's content warning is expanded, then it is expanded in all views a status can be shown in, and similarly when it is collapsed) |
(The :focus issue is unrelated, it's an unintentional bug in the CSS code for statuses, caused by weird selector priority, and would still be the case using |
Expanding/collapsing As far as the specific accessibility concern, using a semantic tag means that a screen reader has a better chance of understanding what the tag is and providing appropriate voice narration accordingly. It's good to be proactive about supporting these things so that the greater ecosystem gets a positive impact in the long term; breaking the chicken-and-egg accessibility cycle is important. (Which is to say it isn't an urgent accessibility need at the moment, but it's the right thing to do.) |
Related: #17115 |
Pitch
Update the web UI HTML to use
<details>
instead of<button>
for content warnings, to improve the markup semantics.This is similar to #1464
Motivation
This would improve accessibility, particularly for users of screen readers.
The text was updated successfully, but these errors were encountered: