Repository navigation
feat(web): mirror ARIA container roles, disabled/busy states, and range controls - #1965
Merged
Merged
Conversation
This was referenced Nov 25, 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 #118
Extends the existing web DOM accessibility mirror (
A11yMirror,web_a11y_items,web_a11y_focus, andbridge.js) to match WAI-ARIA 1.2 role/state semantics and Rune's native AccessKit tree (crates/rune/src/a11y/node.rs) without changing DOM focus routing, Find-in-page, or incremental patch identity.What changed
crates/rune/src/a11y/roles.rs,crates/rune/src/runtime/web/a11y.rs):menu,menubar,tree,treegrid,tabpanel,toolbar,grid,gridcell,rowgroup,form, andsearchas.aria_container()(div[role]witharia-label), preserving hierarchy for menus, trees, tab panels, toolbars, and grids.text("OK").role("gridcell")) project as<p role="...">so text is not dropped.crates/rune/src/runtime/web/a11y.rs,crates/rune/src/runtime/web/a11y/patch.rs,crates/rune/src/platform/web/bridge.js):disabled("dis": true) andbusy("b": true) toA11yItem,SentItem, andweb_focus_item.aria-disabled="true"(without setting HTMLdisabled, keeping disabled controls discoverable as in AccessKit and WAI-ARIA 1.2) andaria-busy="true"on both mirror elements and the canvasaria-activedescendantfocus proxy.web_control_roleelements (menuitem,menuitemcheckbox,menuitemradio,tab,checkbox,radio,switch,option,treeitem) even when they carry noon_presshandler, and rejecteda11y_press/a11y_linkon disabled or disallowed nodes in bothbridge.jsandRuntimeCore::web_a11y_action.aria-levelandaria-expandedontreeitemcontrols and expandable container rows (such astreegridrows).slider/spinbutton) (crates/rune/src/a11y/roles.rs,crates/rune/src/runtime/web/a11y.rs,crates/rune/src/platform/web/bridge.js):sliderandspinbuttonas.web_control()and exportedrg(aria-valuemin/aria-valuemax/aria-valuenow) andvt(aria-valuetext) in the mirror andrginweb_focus_item, omitting range/value on secure nodes and non-finite ranges.sliderandspinbuttonviaaria-labelwith emptytextContent(matching WAI-ARIA 1.2nameFrom: author).examples/web-hello: gave the headerrole("toolbar")andSenddisabled state when the draft is empty, plus an interactive?a11y-proofscene exercising all added roles, states, range controls, and focus proxy updates.examples/web-showcase: added formatteda11y_valuepercentage text to thePuckslider so it exposesaria-valuetextalongsidearia-valuemin/aria-valuemax/aria-valuenow.WEB.md,crates/rune/README.md, and added a changelog entry inchangelog/unreleased/.Outside answer
aria-disabled/aria-busy,aria-level,slider/spinbuttonnameFrom: authorandaria-valuemin/max/now/text, aligned with Rune's native AccessKit mapping incrates/rune/src/a11y/node.rs.Verification
cargo test -p rune --lib a11y(105 passed),cargo test -p rune --lib runtime::web(68 passed),cargo test -p rune-kit --features markdown,mermaid --test a11y(42 passed),cargo check-wasm,cargo check-webgl,cargo check -p web-hello -p web-showcase --target wasm32-unknown-unknown,node --test crates/rune/src/platform/web/bridge.test.mjs(45 passed),scripts/file-size.sh.cargo test -p rune --lib runtime::web(68 passed).web-hello,web-showcase, andfetchon both WebGPU and WebGL2, plus a dedicated?a11y-proofscenario (0/15 ondev, 15/15 on this branch) verifying DOM mirror roles,aria-disabledwithout HTMLdisabled,aria-busy,treeitemwith siblingPreviewbutton,slider/spinbuttonrange attributes, and canvasaria-activedescendantfocus proxy updates.KHR_parallel_shader_compile.