Skip to content

Web: preserve status roles and live-region settings in the accessibility mirror #1677

Done

Description

@pascalandr

A focused follow-up to #118 and the existing live-region reproduction. CodeNomad uses role("status") for temporary, non-interrupting notifications. On Rune 21e5342b9a, the native tree has the live status, while Runtime::a11y_json() and the web DOM mirror expose only plain text. Tx::announce(..., LiveRegion::Polite) is a useful workaround, but does not preserve the status node's semantics.

fn view(_: &(), _: &mut rune::Cx<()>) -> rune::El {
    rune::col().w_full().child(rune::text("Changes saved")
        .key("save-status").role("status").live_region(rune::LiveRegion::Polite))
}

For a headless check, construct Runtime::new((), view, (320.0, 200.0), Env::new(false, 1.0)), call frame(0.0), and compare accessibility_json() with a11y_json(). The relevant paths are runtime/web/a11y.rs (item classification) and platform/web/bridge.js::syncA11y (DOM projection).

Expected: the DOM mirror keeps the status role and live-region setting, preserves the same DOM node across text updates, and does not announce an unchanged status again on repaint. A WASM DOM test can assert the role/live setting and node identity before and after updating the label.

Activity

  1. pascalandr commented on Nov 23, 2026

    @pascalandr
    Author

    The same mirror classification also drops radiogroup: at 21e5342b9a, roles.rs maps it for AccessKit but specifies no web container, so runtime/web/a11y.rs emits the individual radios without the named group. A named radiogroup with two radio children should retain that group in the DOM. alert and status can use the same role-preservation check; Tx::announce covers dynamic announcements in the meantime.

  2. pascalandr commented on Nov 23, 2026

    @pascalandr
    Author

    The same Web mirror also drops a named determinate progress bar. In CodeNomad, a Rune Kit progress bar named “5 hours plan usage” (Progress::new(Some(0.42))) carries the role and range in the native accessibility tree, but the DOM mirror exposes neither. Please also cover a named progressbar with its minimum, maximum and current value in the projection test; the accompanying status text is already covered above.

  3. Hona commented on Nov 23, 2026

    @Hona
    Member

    The web accessibility mirror was dropping status/�lert/log roles and �ria-live politeness, omitting the
    adiogroup container around
    adio buttons, and omitting named progressbar elements and their range/value attributes. This is fixed on dev in #1737 (667a434), preserving live-region DOM node identity across text updates without rewriting unchanged text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions