Skip to content

webmirror: publish the browser tab to the accessibility mirror and text layer - #162

Merged
tannevaled merged 2 commits into
mainfrom
wi1-a11y-mirror
Nov 11, 2026
Merged

tannevaled merged 2 commits into
mainfrom
wi1-a11y-mirror

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

The browser tab drew a canvas a screen reader could not read. This feeds webcanvas's accessibility mirror (W2) and text layer (W3) from the toolkit.

  • New package webmirror: Convert, Nodes, TextInput and Host (a webcanvas.A11yAware and TextInputHost over one or several trees, with a key prefix so two trees of one type cannot collide). The conversion exists once; the gallery will import it.
  • It reuses internal/a11yrole, so the rule of a11y: nameless text fields are dropped by every native bridge #153/fix(a11y): publish nameless interactive nodes in the native bridges #154 holds: zero-area and nameless static nodes are dropped, a nameless interactive node (a text field) is published.
  • internal/tab.Tree implements both interfaces. A TextView or CodeEditor gets the layer through its textinput.Client; widgets are paired with nodes by the same traversal, and a mismatch gives no client rather than the wrong one.
  • Names and values are passed verbatim; webcanvas writes them as text, no HTML path is added.
  • Tests: conversion table (roles, names, values, states, range, keys, prefix, markup), pairing edge cases, 100% of webmirror and internal/tab. The browser-side AX-tree test is in the gallery PR, which is the repo with a page to load.
  • toolkit v0.356.0 to v0.370.0, webcanvas v0.7.0 to v0.14.0.

Refs go-widgets/webcanvas#21

🤖 Generated with Claude Code

tannevaled and others added 2 commits November 11, 2026 09:39
…xt layer

Adds window/webmirror, the one conversion from a toolkit widget tree to
webcanvas.A11yNode (keys, roles, names, values, states, range), reusing the
nameless-field rule of internal/a11yrole, plus a Host that implements
A11yAware and TextInputHost: a TextView is one textbox with its text layer.
The browser-tab Tree uses it. toolkit v0.370.0, webcanvas v0.14.0.

Refs go-widgets/webcanvas#21

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 509db6d into main Nov 11, 2026
29 checks passed
@tannevaled
tannevaled deleted the wi1-a11y-mirror branch November 11, 2026 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant