aria-ease 6.4.7 → 6.4.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -29
- package/bin/{chunk-TQBS54MM.js → chunk-GFKAJHCS.js} +3 -3
- package/bin/cli.cjs +890 -485
- package/bin/cli.js +1 -3
- package/bin/contractTestRunnerPlaywright-7BCEDPZF.js +970 -0
- package/bin/{test-WICJJ62P.js → test-JGKWOL6J.js} +34 -29
- package/dist/{chunk-TQBS54MM.js → chunk-GFKAJHCS.js} +3 -3
- package/dist/contractTestRunnerPlaywright-7BCEDPZF.js +970 -0
- package/dist/index.cjs +890 -483
- package/dist/index.js +34 -29
- package/dist/src/utils/test/{chunk-TQBS54MM.js → chunk-GFKAJHCS.js} +3 -3
- package/dist/src/utils/test/contractTestRunnerPlaywright-O7FF3X67.js +941 -0
- package/dist/src/utils/test/contracts/ComboboxContract.json +1 -0
- package/dist/src/utils/test/index.cjs +861 -477
- package/dist/src/utils/test/index.d.cts +6 -1
- package/dist/src/utils/test/index.d.ts +6 -1
- package/dist/src/utils/test/index.js +34 -29
- package/package.json +1 -1
- package/bin/contractTestRunnerPlaywright-D57V4RSU.js +0 -628
- package/dist/contractTestRunnerPlaywright-D57V4RSU.js +0 -628
- package/dist/src/utils/test/contractTestRunnerPlaywright-HV4EIRDH.js +0 -610
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Aria-Ease
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Accessibility infrastructure for the entire frontend engineering lifecycle.
|
|
4
4
|
|
|
5
|
-
Stop treating accessibility as an afterthought. Aria-Ease engineers
|
|
5
|
+
Stop treating accessibility as an afterthought. Aria-Ease engineers accessibility integrity into every phase of frontend development lifecycle — from local development to production monitoring — so accessibility violations never reach your users.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/aria-ease)
|
|
8
8
|
[](https://opensource.org/licenses/ISC)
|
|
@@ -64,13 +64,14 @@ npx aria-ease audit --url https://yoursite.com
|
|
|
64
64
|
|
|
65
65
|
#### 3. **Contract Testing** (Available Now)
|
|
66
66
|
|
|
67
|
-
This is the game-changer. We encoded the WAI-ARIA APG into deterministic JSON "contracts" and built a custom Playwright runner with isolated test-harness architecture.
|
|
67
|
+
This is the game-changer. We encoded the WAI-ARIA APG into deterministic JSON "contracts" and built a custom Playwright runner with isolated test-harness architecture. Run it locally or in CI/CD.
|
|
68
68
|
|
|
69
69
|
**The result?** Component interaction testing that feels closer to unit testing than manual QA.
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
npx aria-ease test
|
|
72
|
+
npx aria-ease test
|
|
73
73
|
# ✓ 26 assertions in ~4 seconds
|
|
74
|
+
# ✓ 26 assertions in ~1 second in CI
|
|
74
75
|
```
|
|
75
76
|
|
|
76
77
|
**Why this matters:** Before, verifying a combobox meant manual keyboard testing across browsers. Now, it's automated, fast, and repeatable. You can boast about executing 26 combobox interaction assertions in ~4 seconds.
|
|
@@ -650,7 +651,7 @@ describe("Shopify User Menu Accessibility Test", () => {
|
|
|
650
651
|
null,
|
|
651
652
|
"http://localhost:5173/test-harness?component=menu",
|
|
652
653
|
); // For full component interaction test. Uses Playwright to test interaction and behaviors
|
|
653
|
-
}
|
|
654
|
+
});
|
|
654
655
|
});
|
|
655
656
|
|
|
656
657
|
describe("Shopify User Menu Accessibility Test", () => {
|
|
@@ -764,7 +765,7 @@ Until now, accessibility testing often happened manually, late in the cycle, or
|
|
|
764
765
|
**Aria-Ease changes the equation:**
|
|
765
766
|
|
|
766
767
|
- ✅ Automated = no human bottleneck
|
|
767
|
-
- ✅ Fast = ~
|
|
768
|
+
- ✅ Fast = ~6 seconds for 90 accessibility interaction assertions
|
|
768
769
|
- ✅ Deterministic = same results every time
|
|
769
770
|
- ✅ Blocking = deploy fails if tests fail
|
|
770
771
|
|
|
@@ -823,17 +824,27 @@ jobs:
|
|
|
823
824
|
# ⬆️ If audit fails, workflow stops here
|
|
824
825
|
|
|
825
826
|
- name: Run component contract tests
|
|
826
|
-
run:
|
|
827
|
+
run: |
|
|
828
|
+
set -o pipefail
|
|
829
|
+
npm run test 2>&1 | tee component-contract-test-output.txt
|
|
827
830
|
# ⬆️ If interaction tests fail, workflow stops here
|
|
828
831
|
|
|
829
832
|
- name: Upload audit reports
|
|
830
|
-
if:
|
|
833
|
+
if: failure()
|
|
831
834
|
uses: actions/upload-artifact@v4
|
|
832
835
|
with:
|
|
833
836
|
name: accessibility-reports
|
|
834
837
|
path: accessibility-reports/
|
|
835
838
|
retention-days: 30
|
|
836
839
|
|
|
840
|
+
- name: Upload component contract tests report
|
|
841
|
+
if: failure()
|
|
842
|
+
uses: actions/upload-artifact@v4
|
|
843
|
+
with:
|
|
844
|
+
name: component-contract-test-output
|
|
845
|
+
path: component-contract-test-output.txt
|
|
846
|
+
retention-days: 30
|
|
847
|
+
|
|
837
848
|
deploy:
|
|
838
849
|
needs: accessibility-checks # ⬅️ This is the key
|
|
839
850
|
runs-on: ubuntu-latest
|
|
@@ -865,21 +876,12 @@ Create `ariaease.config.js` in your project root:
|
|
|
865
876
|
```javascript
|
|
866
877
|
export default {
|
|
867
878
|
audit: {
|
|
868
|
-
urls: [
|
|
869
|
-
"http://localhost:5173", // Homepage
|
|
870
|
-
"http://localhost:5173/docs", // Docs
|
|
871
|
-
"http://localhost:5173/examples", // Examples
|
|
872
|
-
],
|
|
879
|
+
urls: ["http://localhost:5173/", "http://localhost:5173/changelog"],
|
|
873
880
|
output: {
|
|
874
|
-
format: "
|
|
875
|
-
out: "./accessibility-reports",
|
|
881
|
+
format: "html",
|
|
882
|
+
out: "./accessibility-reports/audit",
|
|
876
883
|
},
|
|
877
884
|
},
|
|
878
|
-
test: {
|
|
879
|
-
components: ["menu", "accordion", "tabs", "combobox"], // Components to test
|
|
880
|
-
baseUrl: "http://localhost:5173/test-harness",
|
|
881
|
-
browser: "chromium",
|
|
882
|
-
},
|
|
883
885
|
};
|
|
884
886
|
```
|
|
885
887
|
|
|
@@ -888,8 +890,8 @@ Add to `package.json`:
|
|
|
888
890
|
```json
|
|
889
891
|
{
|
|
890
892
|
"scripts": {
|
|
891
|
-
"audit": "aria-ease audit",
|
|
892
|
-
"test:a11y": "aria-ease test",
|
|
893
|
+
"audit": "npx aria-ease audit -f html",
|
|
894
|
+
"test:a11y": "npx aria-ease test",
|
|
893
895
|
"ci": "npm run audit && npm run test:a11y"
|
|
894
896
|
}
|
|
895
897
|
}
|
|
@@ -970,14 +972,10 @@ One of the biggest blockers to adding accessibility testing to CI/CD is **speed*
|
|
|
970
972
|
**Aria-Ease contract testing is fast:**
|
|
971
973
|
|
|
972
974
|
```bash
|
|
973
|
-
npx aria-ease test
|
|
974
|
-
# ✓ 26 interaction assertions in ~
|
|
975
|
-
|
|
976
|
-
npx aria-ease test --component menu
|
|
977
|
-
# ✓ 15 interaction assertions in ~2.8 seconds
|
|
975
|
+
npx aria-ease test
|
|
976
|
+
# ✓ 26 combobox interaction assertions in ~1 seconds in CI
|
|
977
|
+
# ✓ 90 accessibility interaction assertions in ~6 seconds in CI
|
|
978
978
|
|
|
979
|
-
npx aria-ease test # All components
|
|
980
|
-
# ✓ 80+ assertions in ~12 seconds
|
|
981
979
|
```
|
|
982
980
|
|
|
983
981
|
**Why so fast?**
|
|
@@ -80,7 +80,7 @@ ${"\u2550".repeat(60)}`);
|
|
|
80
80
|
failureMessage,
|
|
81
81
|
isOptional: test.isOptional
|
|
82
82
|
};
|
|
83
|
-
if (status === "skip"
|
|
83
|
+
if (status === "skip") {
|
|
84
84
|
result.skipReason = "Requires real browser (addEventListener events)";
|
|
85
85
|
}
|
|
86
86
|
this.dynamicResults.push(result);
|
|
@@ -186,7 +186,7 @@ ${"\u2550".repeat(60)}`);
|
|
|
186
186
|
`);
|
|
187
187
|
if (totalFailures === 0 && this.skipped === 0 && this.optionalSuggestions === 0) {
|
|
188
188
|
this.log(`\u2705 All ${totalRun} tests passed!`);
|
|
189
|
-
this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard
|
|
189
|
+
this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard Interactions \u2713`);
|
|
190
190
|
} else if (totalFailures === 0) {
|
|
191
191
|
this.log(`\u2705 ${totalPasses}/${totalRun} required tests passed`);
|
|
192
192
|
if (this.skipped > 0) {
|
|
@@ -195,7 +195,7 @@ ${"\u2550".repeat(60)}`);
|
|
|
195
195
|
if (this.optionalSuggestions > 0) {
|
|
196
196
|
this.log(`\u{1F4A1} ${this.optionalSuggestions} optional enhancement${this.optionalSuggestions > 1 ? "s" : ""} suggested`);
|
|
197
197
|
}
|
|
198
|
-
this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard
|
|
198
|
+
this.log(` ${this.componentName} component meets WAI-ARIA expectations for Roles, States, Properties, and Keyboard Interactions \u2713`);
|
|
199
199
|
} else {
|
|
200
200
|
this.log(`\u274C ${totalFailures} test${totalFailures > 1 ? "s" : ""} failed`);
|
|
201
201
|
this.log(`\u2705 ${totalPasses} test${totalPasses > 1 ? "s" : ""} passed`);
|