Skip to content

toolkit: add opt-in accessibility bridge#16

Merged
tannevaled merged 1 commit into
mainfrom
toolkit-a11y
Jul 10, 2026
Merged

toolkit: add opt-in accessibility bridge#16
tannevaled merged 1 commit into
mainfrom
toolkit-a11y

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

The fourth pre-1.0 "model edge" item. Gives widgets a back-end-neutral way to describe themselves for screen readers.

  • Accessible interfaceA11y() A11yInfo (role + name + value), implemented by the core widgets: Button, Label, Entry, CheckButton, RadioButton, Switch, Scale.
  • Role vocabulary — WAI-ARIA-named roles the host maps onto its platform layer.
  • CollectA11y([]Widget) — walks a host-composed widget list and returns the A11yInfo for each Accessible one, so the host republishes to WAI-ARIA (wasm) or TTY-cell metadata (tui).

Purely additive and opt-in — one extra method per widget, no existing consumer affected. Also corrects the README's aspirational "widgets carry a Role + Label" claim (they never did — grep confirms no such fields) to describe the real interface.

100% coverage; go vet clean; builds on all 6 arches + js/wasm.

🤖 Generated with Claude Code

Gives widgets a back-end-neutral way to describe themselves for screen
readers: an Accessible interface (A11y() A11yInfo — role + name + value)
implemented by the core widgets (Button/Label/Entry/CheckButton/RadioButton/
Switch/Scale), a WAI-ARIA-named Role vocabulary, and CollectA11y([]Widget) so
a host republishes the tree it composed to the platform layer. Purely additive
and opt-in — one extra method per widget, no existing consumer affected. Also
corrects the README's aspirational 'widgets carry Role+Label' claim (they
never did) to describe the real interface. 100% coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit dc300e1 into main Jul 10, 2026
1 check passed
@tannevaled
tannevaled deleted the toolkit-a11y branch July 10, 2026 12:48
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