Repository navigation
docs: add component accessibility specs and an assistive technology matrix - #2
Merged
Merged
Conversation
…atrix Each component gets an accessibility.md beside it: role, name and states for the web and native, keyboard, focus, expected announcements and known issues, based on the matching APG pattern. docs/assistive-technology-testing.md defines the supported matrix, when a manual pass is required, and a results table per component, all not yet tested. The pull request template, docs/accessibility.md, AGENTS.md and engineering-standards 1.3 link to both.
…onent The component structure contract fails when a component folder has no accessibility.md with every section, or docs/assistive-technology-testing.md has no results section for it. yarn new:component writes the spec stub.
# Conflicts: # docs/accessibility.md
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.
What and why
Adds what mature libraries (GOV.UK Frontend, React Aria) have on top of automation: a written
accessibility spec for every component and a record of manual assistive technology (AT) testing,
plus guards that keep both current.
packages/ui/src/components/<Name>/accessibility.mdfor Button, Card,Icon, Spinner, Stack and TextInput. Each one covers role, name and states (web output next to
the React Native props), a keyboard table, focus, expected VoiceOver / TalkBack / NVDA
announcements and known issues. Each is based on the matching APG pattern, or says there is
none. Gaps are listed as known issues; no component code changed.
docs/assistive-technology-testing.mddefines the supported matrix (VoiceOver +Safari on macOS, VoiceOver on iOS, TalkBack + Chrome on Android, NVDA + Chrome or Firefox on
Windows, keyboard only), says when a manual pass is required (a new component, or a change to
a role, state, keyboard handling or announcement), and has a results table per component. Every
row starts as "Not yet tested".
component-structure.test.tsnow requiresaccessibility.mdwith every section,and a
### <Name>results section in the matrix doc.yarn new:componentwrites a spec stub,and its test checks the stub. There is a new PR template checkbox for the manual AT pass, and
links from
docs/accessibility.md,AGENTS.md("Where new code goes") and engineering-standards1.3.
Relation to #1
The screen reader transcripts are only on #1, which is still open. The specs
describe
main's code and cite those transcripts as "added by #1". Three known issues are marked"(main only)" because #1 fixes them: Button's
aria-busy="false", and TextInput's missingaria-describedbyandaria-invalidon the web. Whichever PR merges second should drop thoseentries and update the TextInput role table.
The specs ship in the npm package because
filesincludessrc. They are docs only, so there isno changeset.
Checklist
yarn checkpasses.component-structure.test.ts(CODEOWNERS) is strengthened, not loosened.