-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Inert subtree section is missing requirement that it should NOT be exposed to accessibility #7796
Comments
The reason I did not add this requirement is because I was told this belonged to the ARIA spec, not HTML, but yeah, I think adding it makes sense.
I believe Chrome also makes inert behave like aria-hidden. @Loirooriol Can you confirm? Not sure about Firefox. cc @emilio |
That seems to be more or less the case. Inert elements are ignored and invisible like aria-hidden. |
I have some pretty major concerns about this. See w3c/html-aam#295 (comment). |
That seems potentially bad. If something in the iframe was focused programmatically, focus would either go to limbo or to the nearest ancestor in the a11y tree. Either way, an AT user is unable to interact while other users can (at least with the keyboard). If I understand correctly, a mouse or touch user can't really interact, though, so maybe this is just an obscure edge case we don't need to worry about too much. Regardless, the a11y behaviour in this case should probably be specified. |
Note that sequential navigation will not move focus into an inert iframe #7605 (comment). So this only matters if the focus goes there programmatically. But yeah, once the focus goes there, sequential navigation works inside the inert iframe.
Yes,
I'm not an a11y expert. Contents of an inert frame shouldn't be considered to be inert for webexposed features due to #7605. I was initially planning to not consider them inert in any case. But considering them inert only for a11y purposes was suggested by @aleventhal. |
I agree that should be resolved. If focus is assigned to inert contents, maybe the inertness should be invalidated for all. |
But back to the edit suggestion, perhaps @jcsteh objects to the “not exposed” language. If so, we could switch to ~“hidden or disabled.”
This way, Gecko can expose inert as disabled, so AT has a way to get at it if focused, and some clauses in ARIA describe what to do when hidden content achieves focus through any means. |
The challenge with "hidden or disabled" is that different browsers will probably do different things, and thus AT doesn't get a consistent experience. To summarise, my two concerns are:
|
Magnifiers are always able to magnify any visible content, even if it’s the edge of an inert carousel view behind the active view. Some features may not work, like speaking the label for partially obscured inert content, but I would argue that’s correct behavior for a valid use of inert. I agree that the spec should be explicit about how inert is expected to be used, how authors should avoid misuse, and how engines could recover from detectable authoring errors. However, even with the potential edge cases you’ve mentioned, using inert as specified would finally allow accessibility-conscious and accessibility-naïve web authors to implement modal states in a reasonably accessible manner. Currently, doing so is trivial on native platforms, but nearly impossible on the Web. Everyone acknowledges tools can be misused, but the potential misuse of inert will be much, much, much less likely than the techniques currently and frequently used to “fake” modal views. Web authors are now forced to use complex combinations of keyboard traps, aria-hidden, focus prevention outside the modal, and other techniques that are almost never implemented correctly. Inert is objectively better than the alternatives already being used. Perhaps you could suggest some language you think would reduce your concerns? |
Taken from Alice's suggestion in w3c/html-aam#295 (comment) with some minor changes:
I'd argue this should be normative because this will be the mapping for APIs. This is not a "maybe"; it's a "definite" (as per spec) that some users absolutely will not perceive the content.
That seems reasonable.
For sure. However, as currently specified, uses of inert other than visually hidden/obscured content are considered valid as per the spec, and such usage would be harmful for AT users. |
agree on these points, and in lieu of a much longer response i had written but have not yet posted, i have a number of suggestions I will post sometime tomorrow where the spec's mention the inert state and I understand the implications of authors not using this attribute correctly, but I'm very concerned with also making appropriate use of the attribute insufficient to the attribute's intent. Authors can presently use a combination of |
i have a similar / updated version that i was going to post tomorrow. Also highly agree that this is not just a note, but there is normative guidance here and there are opportunities for further author guidance to reinforce and provide conformance checker examples |
I also agree with including Alice’s text (w/ Jamie and Scott’s edits) as normative guidance, and pair it with the behavior bullet in the original issue description. |
OK, here are the additional thoughts I had on this (unfortunately I cannot attend the HTML triage meeting where this issue will be discussed, so thanks/apologies for the long response here): Regarding an Regarding Per the 6.3 inert subtrees, I would submit that user agents 'should' ignore the node for the purposes of find-in-page. Being in the inert subtree, someone shouldn't be able to access that content, so I'm not sure what the use case would be to include it in the found results, but not allow access to it. Regarding the note that says
Is mentioning 'disabled' correct here? Controls that are disabled should not participate in form submission - but a multi-step form where different parts of the form become inert when they are not presently in view (so that they can transition into view when necessary to interact with), those inert controls should not be 'disabled' because their values should take part in the form submission. I think this should probably be revised to not mention that the controls are disabled, but rather they are to be treated as if they were hidden, and presently non-interactive to all users. Regarding 6.3.2 The inert attribute, I agree with @jcsteh and @alice that there are aspects of this 'note' which should be normative guidance. As I mentioned in my earlier comment, I revised it a bit further from Alice's original suggested draft and what Jamie's updated suggested above.
The following are bits that could remain notes/examples to expand on the above:
I think that further author guidance could be provided here to stress that E.g., the following is a very basic example of something authors must not do, as this would allow someone using AT to access everything but the link
Where if that paragraph were visually obscured in some way (an added style attribute is provided to emphasize this), the following would potentially be the appropriate way to mark it up, as now all the content would be hidden and a visual style to indicate its (current) inactive state is provided:
Additionally, per #7808 (comment), if there is guidance that could be written to indicate that Edit: briefly mentioned with @nt1m that, not necessarily part of this issue, but spec'ing the concept of Thanks! |
How do you solve the cross-site leak?
@othermaciej disagreed in WICG/inert#69 (comment) |
I personally do not know, nor do I think that's necessarily for me to solve. However, there are accessibility concerns with allowing for such content to receive focus. Is this author guidance, or something that browsers could help prevent, without cross-site leaking? re: the disagreement about |
Would it be correct to map inert to |
I don't think so, since things can become inert without the author explicitly doing it, e.g. opening a modal dialog. And preventing focusability, text selection, etc. in a way that the nested document can't detect that seems hard/impossible.
It does other things like |
@Loirooriol indeed. I was thinking only for the purpose of the mapping to accessibility APIs. I believe |
@zcorpan had been mentioning that over in w3c/html-aam#295 (comment). some additional mappings to reference the non-focusable nature. but yeh. hidden to the a11y api |
We discussed this at the triage meeting #7919, with the conclusion that we should take the following actions:
So I think the original purpose of this thread has moved to w3c/html-aam#410. We can keep this issue open to track the authoring guidance item, or if people want we could create a new issue to discuss that. Either way, @scottaohara, can we count on you to take point on that effort? (Of course with the understanding that we're all busy and there's no time limit here; I just want to make sure nothing is falling through the cracks.) |
Exclusion from tab order also isn't expressed as a requirement. I filed an issue about how similar |
Closes #7796. Co-authored-by: James Teh <jamie@jantrid.net> Co-authored-by: Alice <95208+alice@users.noreply.github.com>
The inert subtrees portion of the spec says:
…but it does not acknowledge that inert subtrees should be hidden from accessibility APIs and assistive technology. To my knowledge, this understanding is shared by the accessibility teams of every major vendor, so I was surprised to not see it explicitly mentioned in the spec. If there is disagreement on this point, I'm unaware of it.
The inert explainer introduction makes it clear that:
If there is no disagreement, this shared understanding should be codified with another bullet such as:
The text was updated successfully, but these errors were encountered: