Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

test(a11y): align disabled card and checkbox oracles with focus contract (#7921)

Cindy Zhang3317fb2a0763
diff --git a/packages/core/src/Button/__tests__/Button.a11y.states.ts b/packages/core/src/Button/__tests__/Button.a11y.states.ts
index 02fce31de5..eeebab9f18 100644
--- a/packages/core/src/Button/__tests__/Button.a11y.states.ts
+++ b/packages/core/src/Button/__tests__/Button.a11y.states.ts
@@ -8,7 +8,8 @@
* BUTTON_PATTERN_EXCLUSIONS, the parts deliberately left to another pattern.
* @position The binding inventory required before any assertion moves
* (`docs/specs/AST-021/spec.md` FR2, FR4), and the single definition of what
- * each state IS.
+ * each state IS. Disabled ClickableCard remains focusable and inert under
+ * `docs/specs/AST-085-focusable-disabled/spec.md` FR1 and FR2.
*
* A state earns a row when it can change what the button pattern promises: a
* different name source, a different operability, a different exposure of
@@ -223,8 +224,8 @@ export const BUTTON_BINDING_STATES = [
{
id: 'clickable-card-disabled',
binding: 'ClickableCard',
- summary: 'a disabled action card',
- facts: facts({operable: false, focusable: false, unavailable: true}),
+ summary: 'a disabled action card: focusable, unavailable, and inert',
+ facts: facts({operable: false, focusable: true, unavailable: true}),
visibleLabel: null,
pointerTargetSelector: '[data-a11y-pointer-target]',
storyId: 'a11y-button-pattern--clickable-card-disabled',
diff --git a/packages/core/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts b/packages/core/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts
index acb5562e23..9726eb9f9a 100644
--- a/packages/core/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts
+++ b/packages/core/src/CheckboxList/__tests__/CheckboxList.a11y.chromium.spec.ts
@@ -10,7 +10,8 @@
* indicators, row paint, hit targets, wrapping, list structure) are recorded
* for the audit and never gate. Only frames that prove a shipped remediation
* gate on its outcome. The select-all CLI block renders through its own
- * story, and its source blob is bound in the manifest.
+ * story, and its source blob is bound in the manifest. Disabled rows expect
+ * focusable aria-disabled controls under AST-085 FR1 and FR7.
*/
import {createHash} from 'node:crypto';
@@ -271,9 +272,9 @@ const CASES: AuditCase[] = [
expect: {
groupName: GROUP,
rows: [
- {checked: true, disabled: 'native'},
- {checked: false, disabled: 'native'},
- {checked: false, disabled: 'native'},
+ {checked: true, disabled: 'focusable'},
+ {checked: false, disabled: 'focusable'},
+ {checked: false, disabled: 'focusable'},
],
},
},
@@ -285,7 +286,7 @@ const CASES: AuditCase[] = [
groupName: GROUP,
rows: [
{checked: false, disabled: false},
- {checked: false, disabled: 'native'},
+ {checked: false, disabled: 'focusable'},
{checked: false, disabled: false},
],
},
@@ -471,7 +472,7 @@ const CASES: AuditCase[] = [
rows: [
{checked: true},
{checked: false},
- {checked: false, disabled: 'native'},
+ {checked: false, disabled: 'focusable'},
],
},
},