Repository navigation
fix(web): preserve status/alert roles, live regions, radiogroup containers, and named progressbars in the accessibility mirror - #1737
Merged
Conversation
…iners, and named progressbars in the accessibility mirror
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 #1677
Root cause
crates/rune/src/a11y/roles.rs:radiogroup(and container forms ofstatus,alert, andlog) had no.aria_container()mapping, soweb_a11y_itemsemitted childradiobuttons without their namedradiogroupcontainer.crates/rune/src/runtime/web/a11y.rs:A11yItem/web_a11y_itemsdroppedstatus/alert/logroles,El::live_regionpoliteness (aria-live), and namedprogressbarelements withrange_value/a11y_value.crates/rune/src/platform/web/bridge.js:syncA11yonly wroteroleongroupandbuttonitems, ignoredaria-liveandaria-value*attributes, and calledreplaceChildren()before settingtextContenton plain-text updates.Changes
crates/rune/src/a11y/roles.rs: markradiogroup,status,alert, andlogwith.aria_container().crates/rune/src/runtime/web/a11y.rs:live("lv"),range("rg":[min, max, value]), andvalue_text("vt") toA11yItem.status/alert/logroles and effective live-region politeness (n.a11y.live.or_else(|| roles::default_live(n.role))) on text and container nodes (keeping empty live text mounted and excluding live text from inline/flow merging, while keeping secure/redacted text excluded).progressbaritems withrole="progressbar", finiterange_value, anda11y_value.crates/rune/src/platform/web/bridge.js:progressbarto adivwithrole="progressbar",aria-label,aria-valuemin,aria-valuemax,aria-valuenow, andaria-valuetext.roleandaria-liveon text and container mirror nodes, keeping keyed DOM node identity across updates and skippingtextContent/replaceChildren()writes when unchanged.Verification
cargo test -p rune -p rune-mermaid -p rune-kit --features rune-kit/markdown,rune-kit/mermaid -- a11y::roles runtime::web::a11y runtime::web::export(33 passed; new tests verified failing before the fix).node --test crates/rune/src/platform/web/bridge.test.mjs(26 passed; newsyncA11ytests verified failing before the fix).cargo check-wasmandcargo check-webgl(both passed).scripts/file-size.sh(0 errors).