Repository navigation
Description
Reproduced at 21e5342b9a4cc33eeee88071b4b1f0eafb1247d4, Windows, Rust 1.99.1, using Runtime without a window. A product WASM build reproduces the same missing controls.
With two closable rune-kit tabs, native elements include both tabs, but Runtime::a11y_json() contains only the close buttons. Tab names and aria-selected disappear from the browser mirror. Removing closes restores the tab controls, while the tablist container remains absent.
Standalone example (compiled and run in both modes):
use rune::{Cx, El, Env, Runtime};
use rune_kit::{Kit, shell::{TabItem, TabOrientation, TabStrip}};
struct State { active: String, plain: bool, closed: usize }
fn view(s: &State, _: &mut Cx<State>) -> El {
TabStrip::new("tabs", TabOrientation::Horizontal)
.tabs([TabItem::new("a", "Alpha").closable(!s.plain),
TabItem::new("b", "Beta").closable(!s.plain)])
.active(Some(&s.active)).close_tab_stop(true).hover_none(true)
.on_select(|s: &mut State, id, _| s.active = id.into())
.on_close(|s: &mut State, _, _| s.closed += 1)
.build(&Kit::neutral(false))
}
fn main() {
let plain = std::env::args().any(|arg| arg == "--plain");
let mut rt = Runtime::new(
State { active: "a".into(), plain, closed: 0 },
view, (800.0, 120.0), Env::new(false, 1.0));
rt.frame(0.0);
for _ in 0..30 { rt.frame(1.0 / 60.0); }
let native = rt.elements();
assert_eq!(native.iter().filter(|e| e.role == "tab").count(), 2);
assert_eq!(native.iter().filter(|e| e.role == "tablist").count(), 1);
let items: Vec<serde_json::Value> =
serde_json::from_str(&rt.a11y_json()).unwrap();
if !plain {
assert_eq!(items.iter().filter(|e| e["o"] == "tab").count(), 2);
} else {
assert_eq!(items.iter().filter(|e| e["o"] == "tablist").count(), 1);
}
}Place in a rune-kit example and run normally, then with --plain. The final assertions fail with 0 instead of 2, then 0 instead of 1.
Source observations:
runtime/web/a11y.rs:button_like && !nested_pressskips the parent tab when its close has a press handler.a11y/roles.rs:tablistlacks a container/ARIA-container mapping.shell/tab_strip/tab.rs: the finalslot.role("tab")follows the public decorator, so wrapping sibling controls there also gives their wrapper a tab role.
Expected: named selectable tabs, selected state, independent close controls and their tablist grouping in the browser semantic representation. Related broader work: #118; #592 concerns exiting children.
Activity
fix(rune): expose project tabs through the web accessibility mirror
Hona commentedon Nov 23, 2026
The web mirror gave tablist no container, and it skipped any pressable control that held another button, so closable tabs were dropped. This is fixed on dev in #1583 (9c915fe): the mirror now writes the tablist, each tab with its selected state, and each close button beside its tab.