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: trap navigation when aria-modal=true #54

Merged
merged 3 commits into from
Feb 18, 2024

Conversation

jlp-craigmorten
Copy link
Contributor

@jlp-craigmorten jlp-craigmorten commented Feb 18, 2024

Issue

Partially resolves #12.

Details

Adds behaviours to trap navigation to a dialog when it is modal. I.e.:

Assistive technologies MAY 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.

Does not add the behaviour to move the virtual cursor to the modal. I.e:

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

TBH, not sure how feasible this is due to it's abiguity... what does "is displayed" mean?

CheckList

  • Has been tested (where required).

@jlp-craigmorten jlp-craigmorten merged commit 213ed42 into main Feb 18, 2024
5 checks passed
@jlp-craigmorten jlp-craigmorten deleted the feat-aria-modal-navigation-trap branch February 18, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: support modal behaviours
1 participant