-
Notifications
You must be signed in to change notification settings - Fork 344
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
Introduce sections for Accessibility tree and aria-hidden #1045
base: main
Are you sure you want to change the base?
Conversation
00826af
to
6321f55
Compare
Thank you for the review @a11ydoer! I've addressed the comments and moved the text into |
aria-practices.html
Outdated
<p>Using <code>aria-hidden</code> with the value <code>true</code> excludes the element and its descendants from the accessibility tree, just like hidden elements, but such elements are <em>not</em> hidden visually. The descendants are excluded from the accessibility tree even if an element in the excluded subtree sets <code>aria-hidden</code> to <code>false</code>.</p> | ||
<p><code>aria-hidden</code> can be used to hide decorative or redundant content from screen readers, for example an inline SVG icon.</p> | ||
<pre><code><a href="/"> | ||
<svg aria-hidden="true">...</svg> |
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.
@mcking65 Do we want to add focusable="false"
to this SVG example code to remind authors that if they use aria-hidden="true"
on an SVG, they will want to force the SVG to not take focus in IE11?
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.
That seems like a bug in IE11. If I understand correctly, APG takes the stance to generally not work around bugs in implementation. I'm not sure if that is only implementation of ARIA or in general, though?
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.
Completely agree that APG should not work around browser bugs, however since IE11 is never going to change, perhaps this bug needs to be worked around permanently? If you do decide to add focusable="false"
, it deserves a decent comment in the code to explain why it's there.
Thanks for the review! I've addressed comments, except I didn't add |
This is a bug of IE 11 and older versions of Edge. I think APG are not responsible for browser bugs. But where a bug is well known and there is a simple solution to avoid it, it would make sense to offer this solution, especially if a bug has such serious consequences as an SVG that is hidden and gets the focus. In addition to unnecessary and invisible navigation steps with the Tab key for keyboard users, this means that the screen reader outputs the role and label of the previous element. |
Thanks @JAWS-test and @carmacleod. I think it is a reasonable balance to include and document simple workarounds for unmaintained and widely used implementations, while in general assume conforming implementations. |
@a11ydoer or @carmacleod, can either of you review this? Thanks! |
Consider making section 9. Excluding subtrees from the accessibility tree |
Consider adding something to the effect of "don't put aria-hidden on interactive content". to the warning box at the end of section 9. Excluding subtrees from the accessibility tree. |
Co-Authored-By: Carolyn MacLeod <[email protected]>
071eabf
to
d5aa456
Compare
Done. |
Done. |
@carmacleod can you review the latest changes? Thanks! |
Fixes #258
Preview | Diff