Repository navigation
fix(Item): keep disabled actions keyboard-reachable - #11169
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| ContextMenuItem | 33.1 kB (+144 B) · 6.3 kB CSS (0) | — | — · — · — |
| MoreMenu | 101.4 kB (+143 B) · 17.6 kB CSS (0) | — | — · — · — |
| DropdownMenu | 101.2 kB (+136 B) · 17.6 kB CSS (0) | — | — · — · — |
25 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| SelectorOption | 21.2 kB (+86 B) · 6.1 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 23.5 kB (+73 B) · 6.6 kB CSS (0) | — | — · — · — |
| Item · Storybook | 17.7 kB (+71 B) · 5.5 kB CSS (0) | 1,751 (+4) | ✓ · ✓ · — |
| DropdownMenuRadioItem | 23.5 kB (+70 B) · 6.6 kB CSS (0) | — | — · — · — |
| RadioListItem | 70.3 kB (+55 B) · 10.2 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 22.6 kB (+52 B) · 6.3 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 88.8 kB (+49 B) · 12.1 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 72.1 kB (+33 B) · 9.7 kB CSS (0) | — | — · — · — |
| Table | 129.3 kB (+27 B) · 18.4 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 114.0 kB (+22 B) · 1.4 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 74.2 kB (+21 B) · 11.5 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 283.4 kB (+21 B) · 454 B CSS (0) | — | — · — · — |
| lab/TransferList | 105.3 kB (+20 B) · 1.2 kB CSS (0) | — | — · — · — |
| Markdown | 192.3 kB (+19 B) · 20.8 kB CSS (0) | — | — · — · — |
| TableCell | 113.4 kB (+18 B) · 17.9 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 112.9 kB (+18 B) · 17.7 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 350.6 kB (+16 B) · 2.4 kB CSS (0) | — | — · — · — |
| ContextMenu | 112.1 kB (+15 B) · 17.5 kB CSS (0) | — | — · — · — |
| lab/Comments | 357.5 kB (+14 B) · 2.5 kB CSS (0) | — | — · — · — |
| ListItem | 73.2 kB (+12 B) · 11.5 kB CSS (0) | — | ✓ · ✓ · ✓ |
| Pagination | 114.5 kB (+12 B) · 17.8 kB CSS (0) | — | — · — · — |
| Selector | 104.4 kB (+9 B) · 17.4 kB CSS (0) | — | — · — · — |
| lab/TabBarMoreList | 95.4 kB (+3 B) · 1.8 kB CSS (0) | — | — · — · — |
| List | 18.9 kB (0) · 790 B CSS (0) | — | ✓ · ✓ · — |
| PowerSearch · Storybook | 295.5 kB (−4 B) · 24.5 kB CSS (0) | 7,140 (0) | ✓ · ✓ · ✓ |
Package size: @astryxdesign/core 7.32 MB packed (+106 B); no new dependencies.
Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.
Accessibility: 1 violation(s)
Accessibility Audit
Status: 1 accessibility violation(s) found — 1 serious.
PowerSearch - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 2/37 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Generated by PR Enrichment workflow | View full report
600156a to
31fd6b3
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. A maintainer adds the ci:run label so CI runs.
Disabled Item actions now keep their Tab stop, expose aria-disabled, and stay inert, as AST-085 FR1, FR2, FR4 and FR6 require; the changed tests fail before the fix and pass after it, and real-browser checks confirm the Tab order, blocked Enter and Space, and the disabled state in the accessibility tree.
- Optional: the changeset could also say that disabled Item and ListItem actions use
aria-disabledinstead of the nativedisabledattribute, so:disabledandtoBeDisabled()no longer match them; AST-085 asks release notes to name that change.
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] Keep disabled Item actions focusable |
There was a problem hiding this comment.
Optional: consumers who match these buttons with :disabled or toBeDisabled() will see them stop matching (this PR made that switch in List.test.tsx). AST-085 asks release notes to name that, for example:
[fix] Disabled Item and ListItem actions stay in the Tab order and use `aria-disabled` instead of the native `disabled` attribute, so `:disabled` and `toBeDisabled()` no longer match them.
|
/approve-spec 31fd6b3 |
…ot native disabled The Item action now stays focusable when disabled (spec:AST-085 FR1), so the read-only field picker's Status row carries aria-disabled="true" instead of the disabled attribute. The click still does nothing.
|
/approve-spec 5016e84 |
There was a problem hiding this comment.
Approved pending CI: the CI run on this head was refused for capacity ("CI is full"), so its tests have not run here yet; a maintainer re-runs the CI jobs.
Disabled Item and ListItem actions now keep their Tab stop, expose aria-disabled, and stay inert, as AST-085 FR1, FR2, FR4 and FR6 require; the changed tests fail before the fix and pass after it, and real-browser checks confirm the Tab order, blocked Enter and Space, and the disabled state in the accessibility tree.
- Optional: the changeset could also say that disabled Item and ListItem actions use
aria-disabledinstead of the nativedisabledattribute, so:disabledandtoBeDisabled()no longer match them.
Fixes #7818.
User impact
Keyboard and screen-reader users can reach disabled
Itemactions, hear that they are unavailable, and keep their place if an action becomes disabled while focused.Problem and solution fit
disabled, and the disabled link usedtabIndex={-1}, removing both from the normal Tab sequence.The fix follows spec:AST-085: retain the focusable control, expose
aria-disabled, remove the disabled link's destination, and block activation.Expected behavior and authority
AST-085 FR1–FR2 require disabled controls to stay in their enabled Tab order, expose
aria-disabled="true", and block activation or navigation. FR4 requires a focused control to keep focus when it becomes disabled. FR6 preserves the focus indicator.Smallest restoration
Disabled
Itembuttons now use the shared disabled-interaction guards without a nativedisabledattribute. Disabled links stay attabIndex={0}and lose their destination. Tests and Item's browser audit cover the keyboard behavior; ListItem docs and tests reflect the inherited Item behavior.Evidence
tabIndex={-1}.Scope
Components:
core/Item,core/List(ListItem)Testing
pnpm exec vitest run packages/core/src/Item/Item.test.tsx packages/core/src/List/List.test.tsx— 190 tests passed.pnpm exec playwright test packages/core/src/Item/__tests__/ItemAudit.a11y.chromium.spec.ts --config playwright.config.ts --project chromium— 15 tests passed, including the disabled Tab stop and focus ring.pnpm -F @astryxdesign/core typecheck— passed.pnpm check:changesets, Prettier, ESLint, and the commit hook's repository checks — passed.