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

feat: support modal behaviours #12

Open
jlp-craigmorten opened this issue Jun 10, 2023 · 5 comments · Fixed by #54
Open

feat: support modal behaviours #12

jlp-craigmorten opened this issue Jun 10, 2023 · 5 comments · Fixed by #54
Labels
feature New feature or request question Further information is requested spec

Comments

@jlp-craigmorten
Copy link
Contributor

When a modal element is displayed, assistive technologies SHOULD navigate to the element unless focus has explicitly been set elsewhere. Some assistive technologies limit navigation to the modal element's contents. If focus moves to an element outside the modal element, assistive technologies SHOULD NOT limit navigation to the modal element.

REF: https://w3c.github.io/aria/#aria-modal

@jlp-craigmorten jlp-craigmorten added the feature New feature or request label Jun 10, 2023
@jlp-craigmorten
Copy link
Contributor Author

See also #44 (comment)

@jlp-craigmorten
Copy link
Contributor Author

See also https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role#possible_effects_on_user_agents_and_assistive_technology

When the dialog is correctly labeled and focus is moved to an element (often an interactive element, such as a button) inside the dialog, screen readers should announce the dialog's accessible role, name and optionally description, along with announcing the focused element.

Though this is not normative, but MDN's opinion (with a disclaimer saying as such).

@jlp-craigmorten
Copy link
Contributor Author

Raised #47 for dialog behaviours as this issue was originally for aria-modal behaviours, which though often comes hand in hand with role="dialog" behaviours, are distinct.

@jlp-craigmorten
Copy link
Contributor Author

R.E.

When a modal element is displayed, assistive technologies SHOULD navigate to the element unless focus has explicitly been set elsewhere

Not sure how feasible this is, in part due to it's abiguity - what does "is displayed" mean in this context. Is it visible in the viewport, a particular CSS style change, in the DOM.

I guess we could look to use something like the isInaccessible() check for whether it's hidden from the accessibility tree, and if not, then navigate to it.

Clarity would also be needed in scenarios such as 2 modals being "displayed" at once. Presumably taking the first would be "good enough"?

@jlp-craigmorten jlp-craigmorten added spec question Further information is requested labels Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request question Further information is requested spec
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant