toolkit: add opt-in accessibility bridge#16
Merged
Merged
Conversation
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>
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.
The fourth pre-1.0 "model edge" item. Gives widgets a back-end-neutral way to describe themselves for screen readers.
Accessibleinterface —A11y() A11yInfo(role + name + value), implemented by the core widgets: Button, Label, Entry, CheckButton, RadioButton, Switch, Scale.Rolevocabulary — WAI-ARIA-named roles the host maps onto its platform layer.CollectA11y([]Widget)— walks a host-composed widget list and returns theA11yInfofor 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 vetclean; builds on all 6 arches + js/wasm.🤖 Generated with Claude Code