Repository navigation
feat(a11y): leave what is behind an open modal dialog out of the tree - #18
Merged
Merged
Conversation
A shown element with role dialog or alertdialog and aria-modal="true" makes everything outside it, except the ancestors that hold it, inert to assistive tech, as browsers do. The last such dialog in tree order is the one on top; one in a hidden subtree is not open. A focus that is not in the built tree (behind a modal, or hidden) is now the window's. AccessKit panics on a focus it cannot find. Behavioural-change: content outside an open aria-modal dialog is no longer in the accessibility tree; a focused node not in the tree reports the window as focused.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VoiceOver could move behind a sheet in Diaryx: Unit's sheets and dialogs carry
role="dialog" aria-modal="true", but the tree builder only recordedmodalon the dialog node and kept everything else.build_accessibility_treefinds the open modal (the last showndialog/alertdialogwitharia-modal="true"in tree order; one underdisplay: nonedoes not count) and leaves out every node that is neither in it nor one of its ancestors, as browsers do.Test:
a_modal_dialog_hides_what_is_behind_it.cargo test -p blitz-dom --lib accessibility,cargo fmt --checkand the blitz-dom clippy job pass.WPT results
Subtests: 1621 newly passing, 796 newly failing (net +825). Tests: 20 added, 130 removed. Crashes: +25. Timeouts: -2.
Subtest changes by area (75 areas)
Full diff (283 changed tests)
Generated by the WPT workflow.