Skip to content
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

Should <dialog> or element with aria-modal cause live regions outside of the dialogs to be ignored? #1854

Open
jurokapsiar opened this issue Dec 9, 2022 · 3 comments
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Milestone

Comments

@jurokapsiar
Copy link

Describe your concern

There is a relatively recent bug in Chromium where if a focus is inside of a dialog or an element with aria-modal, live regions are being ignored.

In the discussion of the issue it was suggested to get feedback from ARIA on the issue.

I have not found any of the ARIA or WCAG documents explaining the specific behavior, however there are few points to consider:

  • it might be expected that if user is interacting with elements inside of a modal, elements outside of it might be ignored, including live regions
  • this however makes tools that are used in standard large web apps for aria-live management like https://www.npmjs.com/package/react-aria-live hard to use as they would need to understand the state of the DOM and move their live regions inside of the modal. With the complexities related to reading and re-reading of the live regions, this would become fragile and unreliable for the users.
  • from major screen readers only VoiceOver currently ignores live regions outside of dialogs. JAWS, NVDA and Narrator still read them

Link to the version of the specification or documentation you were looking at at.

Link to documentation:

https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA19
https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/

Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?

This is not exactly an issue in the document but an ask for feedback or proposal for extension.

Please let me know if there is a better way to get feedback on the issue and guidenance from ARIA.

@JAWS-test
Copy link
Contributor

I think this is a very good question and unfortunately I don't have an answer. I would just like to point out that in my opinion many details about Live Region are not clarified and unfortunately the PR for ARIA APG about Live Regions has not been worked on for 2 years

@scottaohara
Copy link
Member

scottaohara commented Dec 9, 2022

I don't really think it is accurate to call this a 'bug', but it is definitely a use case that needs to be addressed and why the AOM notifications api, or some other proposal that allows for developers to push live region announcements without needing to create special regions on the page - especially visually hidden ones - would be so very welcome.

And for clarity, the reason I wouldn't consider this a bug (but again, I do think this is something that needs to be addressed) is because when invoking a modal dialog - whether that be a custom ARIA dialog or the HTML dialog element - content outside of the modal dialog is not meant to be accessible.

See aria-modal text that states:

When a modal element is displayed, authors SHOULD mark all other contents as inert (such as "inert subtrees" in HTML) if the ability to do so exists in the host language.

Another way to look at this is that maybe ARIA should provide a sort of in between state for 'hidden' content. As right now, authors really just mark something as being hidden, but no way to mark something as "people should not be able to interact with this content right now, but the a11y tree should still be aware of the content and allow for access to it if need be."

The way that I know developers have mitigated this issue (which while your bug is recently filed, this is not really a new problem as this has been quite common when dealing with dialogs where the underlying page is marked as aria-hidden=true, rather than using aria-modal), is they have created a live region for their primary UI, and then one specific to their modal dialog components. While the modal dialog is open, announcements are pushed to the live region within the dialog, and when the dialog is closed, live region announcements continue to be pushed to the primary UI's live region area.

I want to stress that this is a workaround, but tbh, I see so many instances of global live region areas, per this use case, which are essentially working around having multiple live region instances in a single UI.

@mitchellevan
Copy link

Related: when I dismiss a dialog and unhide the underlying page content, I don't want live regions in the underlying page content to re-announce themselves. #1937

@pkra pkra added this to the ARIA 1.4 milestone Jun 28, 2023
@jnurthen jnurthen added the clarification clarifying or correcting language that is either confusing, misleading or under-specified label Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Projects
None yet
Development

No branches or pull requests

6 participants