Repository navigation
fix(core): make disabled Button focusable via aria-disabled per AST-085 - #7906
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 |
|---|---|---|---|
| ChatComposerInput | 72.5 kB (−13 B) · 11.2 kB CSS (0) | — | — · ✗ · — |
| PowerSearch · Storybook | 279.3 kB (−16 B) · 23.5 kB CSS (0) | 7,201 (0) | — · ✗ · — |
| ChatComposer | 74.5 kB (−21 B) · 11.7 kB CSS (0) | — | — · ✗ · — |
103 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Toolbar · Storybook | 40.8 kB (+108 B) · 7.9 kB CSS (0) | 274 (+5) | — · ✓ · — |
| ButtonGroup · Storybook | 40.3 kB (+88 B) · 3.7 kB CSS (0) | 153 (+7) | — · ✓ · — |
| lab/Schedule | 102.4 kB (+88 B) · 3.9 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 67.6 kB (+68 B) · 13.0 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 248.3 kB (+67 B) · 454 B CSS (0) | — | — · — · — |
| Carousel · Storybook | 66.9 kB (+14 B) · 10.8 kB CSS (0) | 605 (+6) | — · ✓ · — |
| DropdownMenuSubMenu | 67.9 kB (+11 B) · 9.7 kB CSS (0) | — | — · ✓ · — |
| lab/CommentPin | 54.4 kB (+5 B) · 1.2 kB CSS (0) | — | — · — · — |
| lab/Comments | 321.2 kB (+5 B) · 2.5 kB CSS (0) | — | — · ✓ · — |
| TabList | 41.6 kB (+3 B) · 6.4 kB CSS (0) | — | — · — · — |
| lab/TransferList | 105.3 kB (+2 B) · 1.7 kB CSS (0) | — | — · ✓ · — |
| AvatarGroup | 43.7 kB (+1 B) · 5.6 kB CSS (0) | — | — · — · — |
| Timestamp | 31.2 kB (+1 B) · 10.2 kB CSS (0) | — | — · — · — |
| BottomSheet | 64.0 kB (0) · 7.5 kB CSS (0) | — | — · ✓ · — |
| BottomSheetSwitcher | 17.7 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| ChatComposerDrawer | 17.7 kB (0) · 4.7 kB CSS (0) | — | — · ✓ · — |
| ChatMessage | 16.8 kB (0) · 3.7 kB CSS (0) | — | — · ✓ · — |
| ChatMessageBubble | 7.2 kB (0) · 3.7 kB CSS (0) | — | — · ✓ · — |
| ChatMessageList | 26.5 kB (0) · 7.0 kB CSS (0) | — | — · ✓ · — |
| ChatMessageMetadata | 19.9 kB (0) · 4.1 kB CSS (0) | — | — · ✓ · — |
| ChatSystemMessage | 7.0 kB (0) · 3.8 kB CSS (0) | — | — · ✓ · — |
| ChatTokenizedText | 7.2 kB (0) · 4.0 kB CSS (0) | — | — · ✓ · — |
| ChatToolCalls | 30.4 kB (0) · 8.3 kB CSS (0) | — | — · ✓ · — |
| ContextMenuItem | 27.5 kB (0) · 6.3 kB CSS (0) | — | — · — · — |
| Drawer | 48.4 kB (0) · 8.2 kB CSS (0) | — | — · ✓ · — |
| DropdownMenuCheckboxItem | 21.8 kB (0) · 6.6 kB CSS (0) | — | — · — · — |
| DropdownMenuDivider | 5.2 kB (0) · 548 B CSS (0) | — | — · ✓ · — |
| DropdownMenuGroup | 6.3 kB (0) · 3.4 kB CSS (0) | — | — · ✓ · — |
| DropdownMenuItem | 21.0 kB (0) · 6.3 kB CSS (0) | — | — · ✓ · — |
| DropdownMenuRadioGroup | 6.3 kB (0) · 3.3 kB CSS (0) | — | — · ✓ · — |
| DropdownMenuRadioItem | 21.8 kB (0) · 6.6 kB CSS (0) | — | — · ✓ · — |
| LayerProvider | 4.1 kB (0) · 20 B CSS (0) | — | — · — · — |
| Markdown | 177.3 kB (0) · 20.0 kB CSS (0) | — | — · — · — |
| TableBody | 3.5 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| TableFooter | 3.5 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| TableHeader | 3.5 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| TableRow | 6.7 kB (0) · 3.9 kB CSS (0) | — | — · — · — |
| ToggleButtonGroup | 6.6 kB (0) · 3.4 kB CSS (0) | — | — · — · — |
| NavHeadingMenu | 15.7 kB (−1 B) · 3.5 kB CSS (0) | — | — · — · — |
| AppShell | 88.3 kB (−2 B) · 13.4 kB CSS (0) | — | — · — · — |
| DropdownMenu | 93.7 kB (−2 B) · 17.1 kB CSS (0) | — | — · ✓ · — |
| Stepper | 59.6 kB (−2 B) · 10.0 kB CSS (0) | — | — · — · — |
| TabMenu | 69.1 kB (−2 B) · 11.0 kB CSS (0) | — | — · — · — |
| SideNavHeading | 72.9 kB (−4 B) · 11.2 kB CSS (0) | — | — · — · — |
| TableCell | 106.5 kB (−4 B) · 17.4 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 106.1 kB (−4 B) · 17.2 kB CSS (0) | — | — · — · — |
| TopNavHeading | 72.3 kB (−4 B) · 11.0 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 111.9 kB (−4 B) · 1.9 kB CSS (0) | — | — · ✓ · — |
| SegmentedControl | 91.2 kB (−5 B) · 6.8 kB CSS (0) | — | — · — · — |
| lab/DiffViewer | 84.3 kB (−5 B) · 2.1 kB CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 101.8 kB (−6 B) · 1.1 kB CSS (0) | — | — · — · — |
| lab/TourStep | 92.5 kB (−6 B) · 590 B CSS (0) | — | — · — · — |
| Calendar · Storybook | 69.0 kB (−7 B) · 10.5 kB CSS (0) | 1,747 (0) | — · ✓ · — |
| SideNav | 87.7 kB (−7 B) · 11.3 kB CSS (0) | — | — · — · — |
| DateRangeInput | 89.4 kB (−8 B) · 12.3 kB CSS (0) | — | — · — · — |
| MobileNav | 68.2 kB (−8 B) · 10.5 kB CSS (0) | — | — · — · — |
| TextInput | 65.4 kB (−9 B) · 11.0 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 142.2 kB (−9 B) · 1.9 kB CSS (0) | — | — · — · — |
| DialogHeader | 60.8 kB (−10 B) · 11.4 kB CSS (0) | — | — · — · — |
| Pagination · Storybook | 106.6 kB (−10 B) · 17.5 kB CSS (0) | 658 (0) | — · ✓ · — |
| ContextMenu | 105.3 kB (−11 B) · 17.0 kB CSS (0) | — | — · — · — |
| Toast | 95.5 kB (−11 B) · 10.2 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 67.1 kB (−11 B) · 11.7 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 100.6 kB (−11 B) · 773 B CSS (0) | — | — · — · — |
| NumberInput | 69.4 kB (−12 B) · 11.3 kB CSS (0) | — | — · — · — |
| Tokenizer | 88.1 kB (−12 B) · 18.3 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 316.3 kB (−12 B) · 2.4 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 72.5 kB (−13 B) · 11.2 kB CSS (0) | — | — · ✓ · — |
| lab/ListInput · Storybook | 98.8 kB (−13 B) · 1.6 kB CSS (0) | 1,760 (0) | — · ✓ · — |
| MoreMenu | 94.0 kB (−14 B) · 17.1 kB CSS (0) | — | — · — · — |
| Typeahead | 76.6 kB (−14 B) · 12.3 kB CSS (0) | — | — · — · — |
| TopNav | 69.8 kB (−15 B) · 10.8 kB CSS (0) | — | — · — · — |
| Button · Storybook | 58.0 kB (−16 B) · 9.9 kB CSS (0) | 686 (−2) | — · ✓ · — |
| Table | 114.7 kB (−16 B) · 17.7 kB CSS (0) | — | — · ✓ · — |
| ToggleButton | 58.9 kB (−16 B) · 10.0 kB CSS (0) | — | — · ✓ · — |
| DateTimeInput · Storybook | 202.1 kB (−17 B) · 18.4 kB CSS (0) | 3,567 (0) | — · ✓ · — |
| Selector | 96.5 kB (−17 B) · 17.1 kB CSS (0) | — | — · — · — |
| Thumbnail | 62.4 kB (−17 B) · 11.5 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 82.0 kB (−18 B) · 12.0 kB CSS (0) | — | — · — · — |
| IconButton · Storybook | 58.0 kB (−18 B) · 9.9 kB CSS (0) | 17 (0) | — · ✓ · — |
| TopNavMenu | 71.9 kB (−18 B) · 11.1 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 294.0 kB (−18 B) · 2.6 kB CSS (0) | — | — · — · — |
| MultiSelector | 91.8 kB (−19 B) · 16.6 kB CSS (0) | — | — · — · — |
| TimeInput | 156.4 kB (−19 B) · 15.7 kB CSS (0) | — | — · — · — |
| Banner | 60.0 kB (−21 B) · 10.4 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 68.2 kB (−21 B) · 10.8 kB CSS (0) | — | — · — · — |
| FileInput | 66.8 kB (−21 B) · 10.8 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 58.3 kB (−21 B) · 9.9 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 58.8 kB (−21 B) · 9.9 kB CSS (0) | — | — · — · — |
| DateInput · Storybook | 179.9 kB (−22 B) · 16.7 kB CSS (0) | 5,636 (0) | — · ✓ · — |
| DrawerHeader | 61.0 kB (−22 B) · 12.8 kB CSS (0) | — | — · ✓ · — |
| ComplexSelector | 68.3 kB (−23 B) · 11.7 kB CSS (0) | — | — · — · — |
| SideNavItem | 67.9 kB (−23 B) · 11.0 kB CSS (0) | — | — · — · — |
| CodeBlock | 72.7 kB (−24 B) · 11.2 kB CSS (0) | — | — · — · — |
| Lightbox · Storybook | 109.2 kB (−24 B) · 10.3 kB CSS (0) | 2,472 (0) | — · ✓ · — |
| ChatLayoutScrollButton | 58.5 kB (−25 B) · 10.1 kB CSS (0) | — | — · — · — |
| Popover | 86.1 kB (−25 B) · 13.9 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 58.5 kB (−26 B) · 10.0 kB CSS (0) | — | — · ✓ · — |
| richtext/RichTextView | 273.7 kB (−28 B) · 2.3 kB CSS (0) | — | — · — · — |
| ChatLayout | 61.3 kB (−29 B) · 10.4 kB CSS (0) | — | — · ✓ · — |
| ChatSendButton | 58.4 kB (−31 B) · 9.9 kB CSS (0) | — | — · — · — |
| AlertDialog | 102.4 kB (−32 B) · 14.2 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 83.9 kB (−33 B) · 751 B CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 6.88 MB packed (+394 B); no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 19 rows, core 25 rows; run pnpm api:report.
Wide change (21 components): add ci:run-visual or ci:run-rtl to run them.
Accessibility: 3 violation(s)
Accessibility Audit
Status: 3 accessibility violation(s) found — 3 serious.
ChatComposer - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 1/19 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
ChatComposerInput - 1 issue(s)
- 🟠 serious: Ensure the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds
- Rule:
color-contrast· Affects 1/18 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
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/36 stories · Learn more - WCAG: 1.4.3 (Level AA)
- Rule:
Generated by PR Enrichment workflow | View full report
f2efa65 to
3fe1a60
Compare
There was a problem hiding this comment.
Thanks for restoring focusable disabled Buttons: the core change works, and Pagination, Calendar and Lightbox now keep focus on the disabled arrow at their boundaries. Changes are needed before approval, because the switch exposes places that still relied on native disabled:
ListInput: ArrowUp and ArrowDown on a disabled or loading reorder handle still reorder rows, sohandleReorderKeyDownneeds amutationsDisabledguard and a test.Carousel: the hidden scroll buttons (opacity: 0) are now invisible Tab stops, so hide the inactive pill withvisibility: hiddenorinertasTouchDateFielddoes.useListFocus: when no item is enabled, keep one Tab stop instead of setting every item totabindex="-1"(AST-085 FR1 and FR7); today this hides a disabled ButtonGroup and Pagination's disabled dots row from the keyboard.- The disabled rows in
Button.a11y.states.tsandToggleButton.a11y.states.tsstill declarefocusable: false, which is why the pr-a11y check fails.
[Automated review]
…ousel buttons are inert; disabled ListInput never reorders; a11y facts
|
Deployment failed for project astryx with the following error: |
There was a problem hiding this comment.
Thanks, the core change works: disabled Buttons now stay focusable with aria-disabled, Pagination, Calendar and Lightbox keep focus at their boundaries, and the ListInput, Carousel, roving-group and inventory issues raised on the first commit are fixed. Two small follow-ups remain before approval:
ButtonGroup.doc.mjs(English, Chinese and dense docs) still says a disabled member drops focus, which is no longer true with this change; drop or replace that reason.MenuButton.a11y.states.tsstill declares the disabled DropdownMenu triggerfocusable: false; it is now a Tab stop, so mark it focusable as you did for the Button and ToggleButton rows, which lets the contract check that it stays closed on the opening keys.
[Automated review]
…AST-085 focusable disabled
## Exact decision needed Where keyboard focus goes when the focused Carousel edge scroll button runs out of content in its direction. ## Existing authority searched - `spec:AST-085` FR1 and FR4 (current): disabled controls stay focusable; a component may name a focus destination for a control it removes, in its own record. - `spec:AST-025` FR12 (current): owns the scroll area's tab stop and naming. - `family:buttons` (current): owns edge button behavior while available. - No `component:Carousel` record exists. Shipped code moves focus to the opposite edge button, falling back to the scroll area, and hides a run-out button. - Open PR #7906 makes disabled Buttons focusable (AST-085). Without this record, a hidden run-out edge button would become an invisible tab stop. ## Decision - A run-out edge scroll button is hidden, takes no tab stop, and is not exposed to assistive technology; it stays mounted. This is removal under AST-085 FR4, not a disabled control (FR1, AR1). - When the focused edge button runs out, focus moves to the scroll area without scrolling it (FR2, DEC-1). - The handoff happens once per edge transition and only while the edge button held focus (FR3). - Everything else about Carousel stays uncontracted. ## Rejected alternatives - Moving focus to the opposite edge button: it may also be hidden, and focus would jump across the carousel. ## Claim scope and non-goals Only edge button visibility, tab order, and the edge focus destination. Scrolling, looping, snapping, fades, and slide semantics are out of scope. ## Evidence and implementation relationship Current source hides run-out edge buttons with `opacity: 0` and native `disabled`, and hands focus to the opposite button. Conformance aligns the handoff to the scroll area and keeps hidden buttons out of the tab order once Button stops using native `disabled`. No implementation is included. ## Writing rubric results - R1 narration: none; present-tense rules only. - R2 research in the record: none. - R3 evidence naming a change: none; verification names test layers. - R4 rejected alternatives over one line or outside a decision: one, one line, in DEC-1. - R5 pull request or issue references remaining: none. - R6 ruled open questions still listing options: none. ## Scope - [x] This PR contains specification records only. - [x] It records observable behavior and preserves equivalent internal implementations. - [x] Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract. - [x] Verification states the evidence layer and failure signal without prescribing CI job/workflow topology. - [x] It records one intentional durable decision, not a rescue for a separable tagalong. - [x] The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision. - [x] Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them. - [x] Public text and artifacts contain no internal Meta context. ## Validation - `pnpm check:knowledge` - Prettier - `git diff --check`
There was a problem hiding this comment.
Thanks, the Button change works: disabled Buttons now stay focusable with aria-disabled, keep focus at the Pagination, Calendar and Lightbox boundaries, and the ButtonGroup docs and DropdownMenu inventory follow-ups are fixed. One change is needed before approval: the Carousel record now current on main (packages/core/src/Carousel/Carousel.spec.md, FR2 and DEC-1) moves focus to the scroll area when the focused edge button runs out, but Carousel.tsx still hands it to the opposite button, and five hand-off tests assert that. Please make the scroll area the receiver for every run-out edge (the code already falls back to it when both buttons run out) and point those tests at the scroller.
[Automated review]
humbertovirtudes
left a comment
There was a problem hiding this comment.
Requesting changes on 3271364246d3427699d730dd34946ee93c4d5731. The earlier ListInput, hidden-Carousel-control, roving-group, applicability, ButtonGroup-doc and DropdownMenu-inventory fixes are credited; they are not repeated as open defects.
-
MAJOR - Carousel edge focus contradicts the current contract. Carousel.tsx:546-568 still chooses the opposite button when it is enabled. Current
component:CarouselFR2/DEC-1 explicitly selects the scroll area for every focused edge-button run-out, without scrolling it; the opposite button is a rejected destination. Use the scroll area consistently, keep the one-transition/focus-elsewhere guards, and update the five handoff tests that currently expect the opposite control. Verify both edges, RTL, snapping, blur and content shrinking to fit through the browser focus path. -
Form-entry-list follow-up. Button.tsx:826-838 forwards supported
name/valuewhile using ARIA rather than native disablement.new FormData(form, submitter)does not invoke click/key guards. A standalone Chromium native-form probe includedintent=savefor an ARIA-disabled submitter and omitted it for a native-disabled submitter. Please add a production-Button regression for an enabled versus truly disabled named submitter and preserve AST-085 FR3's submission exclusion without restoring nativedisabled. That platform probe was not a React Button render; component-level reproduction remains unrun in this review.
AI-assisted source review of the exact head and its respin delta. No fresh component/browser-page/AT certification is claimed.
…isabled focus exit and guidance lines
There was a problem hiding this comment.
Requesting changes: one documentation fix is left. The Button change itself works, and both follow-ups from the last review are fixed.
Disabled Buttons now stay focusable with aria-disabled, keep focus at Pagination's last page and in a closing BottomSheet, and leave their value out of FormData; a ButtonGroup or Toolbar of disabled controls keeps one Tab stop.
- Miss:
packages/core/src/IconButton/IconButton.doc.mjs:58and:252still say a disabled IconButton usesaria-disabledonly when a tooltip is present, but IconButton renders through Button, so every disabled IconButton is nowaria-disabledand focusable; please give both rows the wordingButton.doc.mjs:154and:433now use ("Uses aria-disabled instead of native disabled so the button stays focusable.").
The required pr-a11y check is red only because its browser-spec job reached the 15-minute limit after 440 of 682 tests, all passing; it needs a rerun.
[Automated review]
There was a problem hiding this comment.
Approved pending CI: no test failed on this head, but the test and pr-a11y checks are red because two accessibility jobs stopped at their time limits (Component accessibility contracts after 466 of 488 tests, which passed on the previous revision with the same code, and the browser specs after 472 of 682), so they need a rerun before this can merge.
Disabled Buttons now stay focusable as aria-disabled="true", keep focus at Pagination's last page and in a closing BottomSheet, leave their value out of FormData, and ButtonGroup and Toolbar keep one Tab stop when every control is disabled. The IconButton docs follow-up from the last review is fixed: its isDisabled rows now describe the focusable aria-disabled shape.
[Automated review]
DateTimeInputTouch.test.tsx: main's getOnlyButton query, with this branch's aria-disabled assertions.
|
/approve-spec af1c252 |
There was a problem hiding this comment.
Approved pending CI. Two CI jobs need a rerun before the required checks can pass, so this is not ready to merge yet.
Disabled Buttons now stay focusable as aria-disabled="true", keep focus when they become disabled, and still block clicks, Enter and Space, as AST-085 and the Button spec require; in Chromium, Pagination's next-page button and Calendar's Next month keep focus at the last page and month instead of dropping it to the page body. ButtonGroup and Toolbar keep a single Tab stop when every control is disabled, and a disabled named submit Button stays out of FormData.
- Component accessibility contracts failed one Banner test that timed out loading a story (Banner is unchanged here and the same story loads in its own test), and the pr-a11y browser specs job stopped at its 15-minute limit with no failing test; rerunning both should clear them.
[Automated review]
|
/approve-spec 6158f6d |
There was a problem hiding this comment.
Changes requested. The Button change itself works: disabled Buttons stay focusable as aria-disabled="true", keep focus at Pagination's last page and Calendar's max month instead of dropping it to the page body, and a disabled named submit Button stays out of FormData. The latest merge of main brought in two Carousel snap-paging tests that still read the native disabled property this change retires, so the required test check fails on this head.
- Regression:
packages/core/src/SnapPaging/SnapPaging.test.tsx:275-296readsstart.disabledandend.disabledon Carousel's edge Buttons, which are now alwaysfalse, so two tests fail in test-ui; readgetAttribute('aria-disabled') === 'true'instead, and all 11 tests pass. - Regression:
packages/core/src/Carousel/__tests__/CarouselSnapPagingEdges.interaction.browser.spec.ts:79-80samples(button as HTMLButtonElement).disabled, so both proofs fail at lines 148 and 177 in Chromium and WebKit; samplearia-disabledthe same way.
[Automated review]
…abled Main's snap-paging edge tests read the native disabled property. A disabled Button now stays focusable and sets aria-disabled instead, so the tests read that.
|
/approve-spec c843c4a |
There was a problem hiding this comment.
Approved. Disabled Buttons now stay focusable as aria-disabled="true", keep focus at Pagination's last page and Calendar's max month instead of dropping it to the page body, keep a disabled ButtonGroup or Toolbar at one Tab stop, and leave a disabled named submit Button out of FormData. The two Carousel snap-paging tests that still read the native disabled property now read aria-disabled, and every CI check on this head passes, the snap-paging browser proofs in Chromium and WebKit included.
One optional cleanup: the Scroll left and Scroll right comments in Carousel.tsx (lines 796-799 and 838-839) still open by restating isDisabled={!canScrollStart}; keeping only the reason (the button stays mounted so the layout does not shift) would be enough.
[Automated review]
Main's disabled Button change (meta#7906) and this branch's disabled handle case edit adjacent lines of ListInput.test.tsx. The resolution keeps main's aria-disabled assertion for Add and this branch's handle assertions.
Fixes #7813
User impact
Keyboard and screen-reader users could not reach disabled buttons or discover why they are unavailable because
Buttonrendered the nativedisabledattribute. When a focused button became disabled dynamically (such as navigating to the last page in Pagination or the maximum date in Calendar), keyboard focus dropped directly todocument.body, disorienting the user. Any component relying onButtonwithisDisabledinherited this failure.With this restoration, disabled buttons stay in the enabled focus order, keep focus when they become disabled while focused, expose
aria-disabled="true", and block all activation paths (pointer, keyboard Enter/Space, clickAction). A link Button (href) is the exception: it becomes a<button>when disabled, so a focused link Button still moves focus.Problem and solution fit
Buttonpreviously only usedaria-disabledifisLoadingortooltipwas present; otherwise, it rendered the nativedisabledattribute on<button>.disabledelements are removed by the browser engine from the tab sequence. When a focused control receives nativedisabled, the browser immediately evicts focus todocument.body.Fit: In accordance with AST-085, we remove the native
disabledattribute, exposearia-disabled="true", and ensure all click/activation paths remain blocked and event propagation is stopped.Expected behavior and authority
disabled. They must exposearia-disabled="true", retain focus on disablement, stay in the enabled tab order, and block activation.Smallest restoration
packages/core/src/Button/Button.tsx:disabledattribute from<button>.handleClickprevention/stop-propagation andhandleKeyDownsuppression of Enter/Space while disabled.name, sonew FormData(form, submitter)leaves out its value (FR3).packages/core/src/Button/Button.doc.mjs:isDisableddocumentation across locales to reflect focusablearia-disabled.packages/core/src/Button/Button.test.tsx:toBeDisabled()/toHaveAttribute('disabled')totoHaveAttribute('aria-disabled', 'true')andnot.toHaveAttribute('disabled').@Geervan.Evidence
Pagination(Core/Paginationstory), focusing Next and pressing Enter until page 10 causeddocument.activeElement === document.bodyand the focus ring disappeared.aria-disabled="true", and focus remains on the button with the focus ring visible.Button.test.tsxpass.Maintainer follow-up (2026-11-06)
This PR went two weeks without activity, so a maintainer carried it on this branch. Geervan's commits are kept, and each review point is listed below with where it was addressed.
aria-disabledwith a roving tab stop.main:mainis merged in.Button.tsxkeepsmain's input-group item props and has no nativedisabled.Button.test.tsxkeeps both sides' tests. The ButtonGroup doc keepsmain's touch guidance.toBeDisabled()on Buttons: they now readaria-disabled. That covers PowerSearch's Add filter, the Persian Calendar's month buttons, and ListInput's Add.useAriaDisabledalias is gone. The key-guard and Carousel comments give their reasons without record citations (lint).mainchangeduseListFocuswhile this PR was open:mainnow documents that no item holds the Tab stop while every item is disabled, unless the owner places it withtabStopOrder. This PR's change to that default is reverted. ButtonGroup instead passestabStopOrderwhile it is disabled, so a group disabled as a whole keeps its one Tab stop, and other roving groups are unchanged.mainmade ListInput's reorder grip a plain<button>: this PR's ListInput source change and its reorder-grip assertions return tomain's, since that control is not a Button.tabStopOrderthat keeps one stop while every control is disabled and places it as the default does otherwise.useListFocusexports that order asoneTabStopAmong, and ButtonGroup uses the same order while it is disabled. Test: "stays a single tab stop when every control is a disabled Button".ChatComposerInput.test.tsxafter mergingmain:mainis merged again, and the Send assertions readaria-disabled.main's local Resizable and postinstall cases, which fail the same way onmain, plus one DateInput timing case that passes alone. Lab, richtext and charts: 1,763 passed.tscpasses for core and lab. On this head: Toolbar, ButtonGroup, Button, Chat, SegmentedControl, Pagination anduseListFocustests pass (936), and lint andtscare clean.Real-browser boundary check (this head's Vercel preview Storybook, Chromium)
Focus a boundary control, press Enter once per step until the edge, and read
document.activeElementafter each press. The same check ran against amainStorybook (add0516).maincore-pagination--default<body>from press 9 (the control turns nativelydisabled)aria-disabled="true"at page 10core-calendar--min-max-boundary<body>from press 2aria-disabled="true"at the max monthcore-lightbox--gallery<body>from press 3 (4 / 4)aria-disabled="true"at 4 / 4DateInput's touch sheet month arrows are a separate cause, out of this PR's scope: at the range end the arrow is hidden, so focus drops even with an
aria-disabledButton. A separate fix moves focus first to the other arrow.Scope
Testing
pnpm test packages/core/src/Button/Button.test.tsx pnpm check:sync pnpm check:changesets