Skip to content

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

TypeScript

test(FileInput): the audit expects a loading trigger to be aria-disabled (#9210)

Cindy Zhang11701a466b5b
diff --git a/packages/core/src/FileInput/__tests__/FileInputAudit.a11y.chromium.spec.ts b/packages/core/src/FileInput/__tests__/FileInputAudit.a11y.chromium.spec.ts
index 71ca2fa523..ccdd9ab44b 100644
--- a/packages/core/src/FileInput/__tests__/FileInputAudit.a11y.chromium.spec.ts
+++ b/packages/core/src/FileInput/__tests__/FileInputAudit.a11y.chromium.spec.ts
@@ -441,9 +441,12 @@ function checkCases(
(entry.ariaBusy === 'true') === Boolean(expected.loading),
`${id}: aria-busy ${entry.ariaBusy}`,
);
- // Disabled states keep their own stories; no matrix case is disabled.
+ // Disabled states keep their own stories; no matrix case is disabled. A
+ // busy field blocks a second selection, so its trigger is aria-disabled
+ // while loading: it stays focusable, which keeps its tooltip status
+ // reachable, and is announced as unavailable for a new file.
check(
- entry.ariaDisabled == null,
+ entry.ariaDisabled === (expected.loading ? 'true' : null),
`${id}: aria-disabled ${entry.ariaDisabled}`,
);
if (expected.fileName != null) {