From 0eb8c366632bbb94d5e104668ec1101ddbac7b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=B1=AA?= <1844749591@qq.com> Date: Mon, 27 Jan 2025 11:16:57 +0800 Subject: [PATCH] test: add a11y test --- components/progress/__tests__/a11y.test.ts | 8 ++++++++ components/statistic/__tests__/a11y.test.ts | 6 ++++++ components/steps/__tests__/a11y.test.ts | 6 ++++++ 3 files changed, 20 insertions(+) create mode 100644 components/progress/__tests__/a11y.test.ts create mode 100644 components/statistic/__tests__/a11y.test.ts create mode 100644 components/steps/__tests__/a11y.test.ts diff --git a/components/progress/__tests__/a11y.test.ts b/components/progress/__tests__/a11y.test.ts new file mode 100644 index 000000000000..0cfec1ac243a --- /dev/null +++ b/components/progress/__tests__/a11y.test.ts @@ -0,0 +1,8 @@ +import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; + +accessibilityDemoTest('progress', { + // we can set aria attribute to fix it + disabledRules: ['aria-progressbar-name'], + // we can set aria attribute to fix it + skip: ['circle-steps.tsx'], +}); diff --git a/components/statistic/__tests__/a11y.test.ts b/components/statistic/__tests__/a11y.test.ts new file mode 100644 index 000000000000..ccd6f4179837 --- /dev/null +++ b/components/statistic/__tests__/a11y.test.ts @@ -0,0 +1,6 @@ +import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; + +accessibilityDemoTest('statistic', { + // wait for skeleton fix + skip: ['basic.tsx'], +}); diff --git a/components/steps/__tests__/a11y.test.ts b/components/steps/__tests__/a11y.test.ts new file mode 100644 index 000000000000..88f67f3122e1 --- /dev/null +++ b/components/steps/__tests__/a11y.test.ts @@ -0,0 +1,6 @@ +import accessibilityDemoTest from '../../../tests/shared/accessibilityTest'; + +accessibilityDemoTest('steps', { + // we can set aria attribute to fix it + skip: ['inline.tsx', 'label-placement.tsx', 'progress.tsx'], +});