Repository navigation
fix(a11y): emit level set size on levelled items and read item size_of_set in Windows and Linux adapters - #1819
Merged
Merged
Conversation
…f_set in Windows and Linux adapters
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.
Fixes #533
Root cause
El::levelandEl::position_in_set(pos, size),crates/rune/src/a11y/tree.rswrote only the shallowest level'ssize_of_setonto the container and never setsize_of_seton the levelled item nodes.accesskit_windows(src/node.rs) andaccesskit_atspi_common(src/node.rs) readsize_of_setsolely viasize_of_set_from_container(&filter), so level-2 items likecherry(3 of 3) under a level-1 tree of size 2 were reported as "3 of 2".Role::Groupwrappers by level cannot hide them from navigation becausecommon_filtergates bothsize_of_set_from_containerand platform navigation visibility on Windows UIA, macOS VoiceOver, and Linux AT-SPI.Changes
crates/rune/src/a11y/tree.rs: emitnode.set_size_of_set(size)directly on ordered-set items ina11y_buildwhen bothEl::leveland explicitEl::position_in_set(pos, size)are set (keeping the shallowest level'ssize_of_seton the container, leaving unlevelled lists and trees without explicitposition_in_setbyte-for-byte unchanged, and mixing the condition into the item's fingerprint ina11y_walk).vendor/accesskit_windows/src/node.rs&vendor/accesskit_windows.patch: readself.node.size_of_set()on item roles (is_item_like() || role == Role::Row) before falling back tosize_of_set_from_container(&filter), so containers never report their children's count as their own sibling set size.vendor/accesskit_atspi_common,vendor/accesskit_atspi_common.patch,scripts/vendor-accesskit-atspi-common.sh,Cargo.toml,Cargo.lock,README.md,crates/rune/README.md,AGENTS.md,ARCHITECTURE.md: vendoraccesskit_atspi_common 0.21.1with the same item-firstsize_of_setlookup for Linux AT-SPI. Apps that omit the new[patch.crates-io]entry still compile and run against crates.ioaccesskit_atspi_common.crates/rune/src/a11y/tree_tests.rs,vendor/accesskit_windows/src/node.rs,vendor/accesskit_atspi_common/src/node.rs: regression tests for flat-tree per-levelsize_of_set, container non-leakage (Tree,ListBox,TreeGrid,Group), container fallback, and incremental updates.Verification
cargo test -p rune -p rune-mermaid -p rune-kit --features rune-kit/markdown,rune-kit/mermaid a11y(90 passed inrune, 2 inrune-kitlib),cargo test -p rune-kit --features rune-kit/markdown,rune-kit/mermaid --test a11y(26 passed; all goldens unchanged), and headless unit tests in bothvendor/accesskit_windowsandvendor/accesskit_atspi_common(both passed).aarch64):cargo check -p rune -p rune-kit --testspassed against vendoredvendor/accesskit_atspi_common.scripts/vendor-accesskit-windows.sh 0.35.2,scripts/vendor-accesskit-atspi-common.sh 0.21.1, andscripts/file-size.sh(0 errors).accesskit_macosdoes not expose set size or position yet.