Repository navigation
fix(web): export a11y_value and combobox role in the web accessibility mirror and focus proxy - #1752
Merged
Merged
Conversation
…y mirror and focus proxy
This was referenced Nov 23, 2026
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 #1676
Root cause
rune_kit::Select(crates/rune-kit/src/overlays/select.rs) setsrole("combobox"),label(name),expanded(open), anda11y_value(current)while hiding its visible value text witha11y_hidden().RuntimeCore::web_focus_itemandRuntimeCore::web_a11y_itemsincrates/rune/src/runtime/web/a11y.rsdroppedEl::a11y_value, andcomboboxlacked aweb_control_roleincrates/rune/src/a11y/roles.rs.focusA11yandsyncA11yincrates/rune/src/platform/web/bridge.jsnever projected a control's value onto the focus proxy or mirrored combobox element.Changes
crates/rune/src/a11y/roles.rs: markcomboboxas aweb_controlrole so mirrored combobox triggers keeprole="combobox".crates/rune/src/runtime/web/a11y.rs:mirror_valueto readEl::a11y_valuewhile omitting empty values and secure nodes (or descendants of secure containers)."v"fromweb_focus_itemandA11yItem::to_json, and mirrorrole="combobox"triggers inweb_a11y_itemseven without anon_presshandler.crates/rune/src/platform/web/bridge.js:focusA11y, clearel.textContent = ''on every focus turn and projectf.vtoaria-valuetextfor range roles (slider,spinbutton,progressbar,meter,scrollbar) orel.textContentforcomboboxand other roles alongsidearia-label(matching Chromium's select-only combobox exposure).syncA11y, mirrorcomboboxitems witharia-labelfor the accessible name andtextContentforitem.v.crates/rune/src/runtime/web/a11y_tests.rs,crates/rune-kit/tests/a11y/overlays.rs,crates/rune/src/platform/web/bridge.test.mjs: regression tests coveringweb_a11y_focus,web_a11y,rune_kit::Select, secure omission,focusA11y, andsyncA11y.Verification
cargo test -p rune -p rune-mermaid -p rune-kit --features rune-kit/markdown,rune-kit/mermaid runtime::web::a11y(20 passed)cargo test -p rune -p rune-mermaid -p rune-kit --features rune-kit/markdown,rune-kit/mermaid a11y::roles(6 passed)cargo test -p rune-kit --features rune-kit/markdown,rune-kit/mermaid --test a11y overlays(7 passed)node --test crates/rune/src/platform/web/bridge.test.mjs(28 passed)cargo check-wasmandcargo check-webgl(both passed)scripts/file-size.sh(0 errors)