Repository navigation
feat(a11y): per-window tree and action hooks, for code that has a window's id but not its View - #17
Merged
Merged
Conversation
…dow's id but not its View
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.
A component inside a document that dioxus-native's launcher runs knows its window's id, but never holds the window's
View, so it cannot callView::set_accessibility_tree_hook. Diaryx's editor is such a component: it draws its own text area, and needs to put that text area's text, runs and selection into the tree, and to carry out what assistive tech asks of it (set the value, move the selection).set_accessibility_hooks(window, tree, action)sets, for one window, a tree hook (run after theView's own on each tree built) and an action hook (offered each action request before Blitz carries it out; it returns whether it did).clear_accessibility_hooks(window)removes them.WindowId, on the event loop's thread. A hook runs with the map free, so it may set or clear hooks.AccessibilityStateclears its hooks when it drops.Checked locally:
cargo test -p blitz-shell --features accessibility --lib(2 new tests),cargo fmt --all --check, clippy onblitz-shellwith its tests (no warnings inblitz-shell; two old upstream lints inblitz-domandblitz-paintshow only with these narrow features, and the workspace build does not hit them),cargo doc -p blitz-shell.