-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Hiding things example - description not aligned with code #30171
Comments
Hey! Thank you for bringing this up. You’re absolutely right: this particular example is not fully accessible. Not just because of the positioning but also because it lacks focus management, needed ARIA roles, etc. The whole section needs to be rewritten. |
Thanks @pepelsbey - I discovered this content as I am studying for the WAS exam and it is referenced in the Body of Knowledge, so it would be great to have amended! |
@Liz-Matmos Maybe are you interested in submitting a PR with the needed changes? It would help us fix it more quickly. |
As for the potential fix, I’d suggest using something else instead of improving this example. There are some good thoughts/examples in these articles: https://www.scottohara.me/blog/2017/04/14/inclusively-hidden.html |
The code is fixed by mdn/learning-area#745. Welcoming a PR to change the description. |
Should be fixed in mdn/learning-area#745 Let me know if there's anything left. |
MDN URL
https://developer.mozilla.org/en-US/docs/Learn/Accessibility/CSS_and_JavaScript
What specific section or headline is this issue about?
Hiding things
What information was incorrect, unhelpful, or incomplete?
The example shown uses a tabs widget, and tabpanel content that is not visible is discoverable by screen readers due to the absolute positioning. The content reads:
and
What did you expect to see?
Does this not cause an issue for sighted screen reader users? Wouldn't the best approach for the example given be to use display:none; as per the APG Tabs pattern?
Do you have any supporting links, references, or citations?
APG guidance as above. Many screen reader users have some vision, and generally what they hear and see should be in harmony.
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/learn/accessibility/css_and_javascript
The text was updated successfully, but these errors were encountered: