Repository navigation
fix(web): mirror tablist containers and closable tabs with sibling close buttons - #1583
Merged
Merged
Conversation
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 #1344
Root cause
crates/rune/src/a11y/roles.rs:tablistwas registered without.aria_container(), soroles::container_tag("tablist")returnedNoneandRuntimeCore::web_a11y_itemsomitted thetablistcontainer.crates/rune/src/runtime/web/a11y.rs:web_a11y_itemsskipped anybutton_likeelement whennested_presswas true, dropping closable tabs (role="tab") because their descendant close button hason_press/role="button".Changes
crates/rune/src/a11y/roles.rs: marktablistwith.aria_container()so it mirrors as a<div role="tablist">container.crates/rune/src/runtime/web/a11y.rs:button_likenodes that carry an explicitroles::web_control_roleeven whennested_pressis true.nested_pressis true, advancei += 1while trackingcontrol_endso nested interactive descendants (such as a tab's close button) mirror as sibling<button>elements under the enclosingtablistwithout duplicating the control's own non-interactive text.a11y.hidden, invisible, and nested pressable subtrees indescendant_labelso a control without an explicit label does not absorb a nested button's name.crates/rune/src/runtime/web/a11y_tests.rsandcrates/rune-kit/src/shell/tab_strip/tests.rs: add regression tests fortablist, closable tabs, selected state, sibling close buttons, anda11y_pressactivation.changelog/unreleased/2026-11-23-web-a11y-tablist-closable-tabs.md: changelog entry.Verification
cargo test -p rune -p rune-mermaid -p rune-kit --features rune-kit/markdown,rune-kit/mermaid -- runtime::web:: a11y::roles shell::tab_strip(43 passed inrune, 3 passed inrune-kit)cargo test -p rune -p rune-kit --features rune-kit/markdown,rune-kit/mermaid -- a11y(40 passed, 1 ignored inrune; 1 passed inrune-kit)cargo check -p rune --no-default-features --target wasm32-unknown-unknown(passed)scripts/file-size.sh(passed)bridge.js(verified viaRuntime::a11y_json()andRuntime::web_a11y_items()unit tests and wasm32 compilation).