aria-ease 6.4.4 → 6.4.5

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 CHANGED
@@ -1,12 +1,114 @@
1
1
  # Aria-Ease
2
2
 
3
- Design, verify, and enforce accessible web development with ARIA component utilities, automated audits, component interaction testing, and CI/CD pipelines — all in one infrastructure.
3
+ **Accessibility infrastructure for the entire frontend engineering lifecycle.**
4
+
5
+ Stop treating accessibility as an afterthought. Aria-Ease engineers technical integrity into every phase of frontend development — from local development to production monitoring — so accessibility violations never reach your users.
4
6
 
5
7
  [![npm version](https://img.shields.io/npm/v/aria-ease.svg)](https://www.npmjs.com/package/aria-ease)
6
8
  [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
7
9
  [![Bundle Size](https://img.shields.io/bundlephobia/minzip/aria-ease)](https://bundlephobia.com/package/aria-ease)
8
10
  [![npm downloads](https://img.shields.io/npm/dm/aria-ease.svg)](https://www.npmjs.com/package/aria-ease)
9
11
 
12
+ ## 🏗️ Infrastructure, Not Just Utilities
13
+
14
+ Aria-Ease isn't a utility library. **It's an accessibility infrastructure** that integrates into every phase of your frontend engineering lifecycle:
15
+
16
+ | Phase | Feature | Status | Impact |
17
+ | ------------------ | --------------------------------------------- | ------------ | --------------------------------------- |
18
+ | **🔧 Development** | Component utilities for accessible patterns | ✅ Available | Build it right from the start |
19
+ | **⚡ Linting** | ESLint rules to enforce accessible coding | 🚧 Roadmap | Catch mistakes as you type |
20
+ | **🔍 Pre-Deploy** | Axe-core powered static accessibility audit | ✅ Available | Verify before it ships |
21
+ | **🧪 Testing** | WAI-ARIA APG contract testing with Playwright | ✅ Available | 26 combobox assertions in ~4 seconds |
22
+ | **🚀 CI/CD** | Accessibility as deployment gatekeeper | ✅ Available | Block inaccessible code from production |
23
+ | **📊 Production** | Real user signal monitoring and replay | 🚧 Roadmap | Understand how users actually interact |
24
+ | **📈 Insights** | Dashboard for reporting and analytics | 🚧 Roadmap | Visualize accessibility health |
25
+
26
+ **The philosophy:** By the time your app reaches manual testing, there should only be minute, non-automatable aspects left to verify.
27
+
28
+ **The reality:** Code that fails accessibility checks cannot reach production. Period.
29
+
30
+ ---
31
+
32
+ ## 🎯 The Complete Lifecycle
33
+
34
+ ### From Development to Production
35
+
36
+ **Traditional approach:** Build features → Manual testing → Find accessibility issues → Fix them → Manual testing again → Ship (maybe)
37
+
38
+ **Aria-Ease approach:** Build with accessible utilities → Automated audits catch issues → Contract tests verify behavior → CI/CD gates deployment → Ship with confidence
39
+
40
+ ### What Makes This Different?
41
+
42
+ #### 1. **Component Utilities** (Available Now)
43
+
44
+ Reusable accessible interaction patterns that implement WAI-ARIA APG specifications. Tree-shakable, framework-agnostic, production-ready.
45
+
46
+ ```javascript
47
+ // Instead of 50+ lines managing ARIA attributes and keyboard events...
48
+ import { makeMenuAccessible } from "aria-ease/menu";
49
+
50
+ const menu = makeMenuAccessible({
51
+ menuId: "user-menu",
52
+ triggerId: "profile-button",
53
+ menuItemsClass: "menu-item",
54
+ }); // Arrow keys, Escape, focus management — all handled
55
+ ```
56
+
57
+ #### 2. **Static Audit** (Available Now)
58
+
59
+ Axe-core powered CLI that scans your entire site and generates comprehensive reports. Run it locally or in CI/CD.
60
+
61
+ ```bash
62
+ npx aria-ease audit --url https://yoursite.com
63
+ ```
64
+
65
+ #### 3. **Contract Testing** (Available Now)
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.
68
+
69
+ **The result?** Component interaction testing that feels closer to unit testing than manual QA.
70
+
71
+ ```bash
72
+ npx aria-ease test --component combobox --url http://localhost:3000
73
+ # ✓ 26 assertions in ~4 seconds
74
+ ```
75
+
76
+ **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.
77
+
78
+ #### 4. **CI/CD Integration** (Available Now)
79
+
80
+ Turn accessibility into a deployment invariant. Add audit and test commands to your pipeline — if they fail, deployment is blocked.
81
+
82
+ ```yaml
83
+ # .github/workflows/deploy.yml
84
+ jobs:
85
+ accessibility-gate:
86
+ runs-on: ubuntu-latest
87
+ steps:
88
+ - run: npm run build
89
+ - run: npx aria-ease audit # Static checks
90
+ - run: npx aria-ease test # Interaction tests
91
+ # Only deploy if both pass ☝️
92
+ ```
93
+
94
+ Real example from our docs site: Push to branch → Accessibility checks run → Green check mark → Deploys to Firebase. Red X → Deploy blocked.
95
+
96
+ **No one has any excuse to ship inaccessible code anymore.**
97
+
98
+ #### 5. **Linting** (Roadmap)
99
+
100
+ ESLint rules that enforce accessible coding patterns as you type. Catch issues before they compile.
101
+
102
+ #### 6. **Production Monitoring** (Roadmap)
103
+
104
+ Real user signal monitoring, interaction replay, and analytics. Understand how assistive technology users actually experience your app.
105
+
106
+ #### 7. **Insights Dashboard** (Roadmap)
107
+
108
+ Visualize accessibility health across your entire application. Track progress, identify patterns, generate reports.
109
+
110
+ ---
111
+
10
112
  ## ✨ Features
11
113
 
12
114
  - 🎯 **Tree-shakable** - Import only what you need (1.4KB - 3.7KB per component)
@@ -98,7 +200,7 @@ After auditing your project, show the world you care about accessibility! Add a
98
200
 
99
201
  **For projects using both audits and component tests:**
100
202
 
101
- [![Verified by aria-ease](https://cdn.jsdelivr.net/gh/aria-ease/aria-ease@main/badges/verified-aria-ease.svg)](https://github.com/aria-ease/aria-ease)
203
+ [![Verified by aria-ease](https://cdn.jsdelivr.net/gh/aria-ease/aria-ease@main/badges/verified-by-aria-ease.svg)](https://github.com/aria-ease/aria-ease)
102
204
 
103
205
  ```markdown
104
206
  [![Verified by aria-ease](https://cdn.jsdelivr.net/gh/aria-ease/aria-ease@main/badges/verified-by-aria-ease.svg)](https://github.com/aria-ease/aria-ease)
@@ -651,7 +753,253 @@ For older browser support, use a polyfill service or transpile with appropriate
651
753
 
652
754
  ---
653
755
 
654
- ## 📖 More Resources
756
+ ## CI/CD Integration: Accessibility as a Deployment Gatekeeper
757
+
758
+ **The game-changer:** Turn accessibility into a deployment invariant. Code that fails accessibility checks cannot reach production.
759
+
760
+ ### Why This Matters
761
+
762
+ Until now, accessibility testing often happened manually, late in the cycle, or not at all. Even with good intentions, inaccessible code slips through when testing is manual and optional.
763
+
764
+ **Aria-Ease changes the equation:**
765
+
766
+ - ✅ Automated = no human bottleneck
767
+ - ✅ Fast = ~4 seconds for comprehensive component testing
768
+ - ✅ Deterministic = same results every time
769
+ - ✅ Blocking = deploy fails if tests fail
770
+
771
+ **Real example:** The aria-ease docs site has a pipeline that:
772
+
773
+ 1. Runs `aria-ease audit` on every push
774
+ 2. Runs `aria-ease test` for component interaction verification
775
+ 3. Only deploys to Firebase if both pass
776
+ 4. Blocks deployment if either fails
777
+
778
+ **Result:** Green check ✓ = live docs. Red X ✗ = deploy blocked. No exceptions.
779
+
780
+ ### GitHub Actions Example
781
+
782
+ Here's a complete workflow that gates deployment on accessibility:
783
+
784
+ ```yaml
785
+ name: Accessibility Gate + Deploy
786
+
787
+ on:
788
+ push:
789
+ branches: [main]
790
+ pull_request:
791
+ branches: [main]
792
+
793
+ jobs:
794
+ accessibility-checks:
795
+ runs-on: ubuntu-latest
796
+
797
+ steps:
798
+ - name: Checkout code
799
+ uses: actions/checkout@v4
800
+
801
+ - name: Setup Node.js
802
+ uses: actions/setup-node@v4
803
+ with:
804
+ node-version: "20"
805
+ cache: "npm"
806
+
807
+ - name: Install dependencies
808
+ run: npm install
809
+
810
+ - name: Install Playwright browsers
811
+ run: npx playwright install --with-deps chromium
812
+
813
+ - name: Build application
814
+ run: npm run build
815
+
816
+ - name: Start dev server
817
+ run: |
818
+ npm run dev &
819
+ npx wait-on http://localhost:5173 -t 30000
820
+
821
+ - name: Run accessibility audit
822
+ run: npx aria-ease audit
823
+ # ⬆️ If audit fails, workflow stops here
824
+
825
+ - name: Run component contract tests
826
+ run: npx aria-ease test
827
+ # ⬆️ If interaction tests fail, workflow stops here
828
+
829
+ - name: Upload audit reports
830
+ if: always()
831
+ uses: actions/upload-artifact@v4
832
+ with:
833
+ name: accessibility-reports
834
+ path: accessibility-reports/
835
+ retention-days: 30
836
+
837
+ deploy:
838
+ needs: accessibility-checks # ⬅️ This is the key
839
+ runs-on: ubuntu-latest
840
+ if: github.ref == 'refs/heads/main'
841
+
842
+ steps:
843
+ - uses: actions/checkout@v4
844
+
845
+ - name: Install dependencies
846
+ run: npm install
847
+
848
+ - name: Build for production
849
+ run: npm run build
850
+
851
+ - name: Deploy to Firebase
852
+ uses: w9jds/firebase-action@master
853
+ with:
854
+ args: deploy --only hosting
855
+ env:
856
+ FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
857
+
858
+ # Deployment only happens if accessibility-checks job passes ✅
859
+ ```
860
+
861
+ ### Configuration for CI/CD
862
+
863
+ Create `ariaease.config.js` in your project root:
864
+
865
+ ```javascript
866
+ export default {
867
+ audit: {
868
+ urls: [
869
+ "http://localhost:5173", // Homepage
870
+ "http://localhost:5173/docs", // Docs
871
+ "http://localhost:5173/examples", // Examples
872
+ ],
873
+ output: {
874
+ format: "all", // Generate JSON, CSV, and HTML reports
875
+ out: "./accessibility-reports",
876
+ },
877
+ },
878
+ test: {
879
+ components: ["menu", "accordion", "tabs", "combobox"], // Components to test
880
+ baseUrl: "http://localhost:5173/test-harness",
881
+ browser: "chromium",
882
+ },
883
+ };
884
+ ```
885
+
886
+ Add to `package.json`:
887
+
888
+ ```json
889
+ {
890
+ "scripts": {
891
+ "audit": "aria-ease audit",
892
+ "test:a11y": "aria-ease test",
893
+ "ci": "npm run audit && npm run test:a11y"
894
+ }
895
+ }
896
+ ```
897
+
898
+ ### Other CI Platforms
899
+
900
+ **GitLab CI:**
901
+
902
+ ```yaml
903
+ accessibility:
904
+ stage: test
905
+ script:
906
+ - npm install
907
+ - npm run build
908
+ - npm run dev &
909
+ - npx wait-on http://localhost:5173
910
+ - npx aria-ease audit
911
+ - npx aria-ease test
912
+ artifacts:
913
+ paths:
914
+ - accessibility-reports/
915
+ when: always
916
+
917
+ deploy:
918
+ stage: deploy
919
+ needs: [accessibility] # Gates deployment
920
+ script:
921
+ - npm run deploy
922
+ only:
923
+ - main
924
+ ```
925
+
926
+ **CircleCI:**
927
+
928
+ ```yaml
929
+ version: 2.1
930
+
931
+ jobs:
932
+ accessibility:
933
+ docker:
934
+ - image: mcr.microsoft.com/playwright:v1.40.0-focal
935
+ steps:
936
+ - checkout
937
+ - run: npm install
938
+ - run: npm run build
939
+ - run: npm run dev &
940
+ - run: npx wait-on http://localhost:5173
941
+ - run: npx aria-ease audit
942
+ - run: npx aria-ease test
943
+ - store_artifacts:
944
+ path: accessibility-reports
945
+
946
+ deploy:
947
+ docker:
948
+ - image: node:20
949
+ steps:
950
+ - checkout
951
+ - run: npm install
952
+ - run: npm run deploy
953
+
954
+ workflows:
955
+ build-test-deploy:
956
+ jobs:
957
+ - accessibility
958
+ - deploy:
959
+ requires:
960
+ - accessibility # Gates deployment
961
+ filters:
962
+ branches:
963
+ only: main
964
+ ```
965
+
966
+ ### Performance & Speed
967
+
968
+ One of the biggest blockers to adding accessibility testing to CI/CD is **speed**. Nobody wants pipelines that take 30 minutes.
969
+
970
+ **Aria-Ease contract testing is fast:**
971
+
972
+ ```bash
973
+ npx aria-ease test --component combobox
974
+ # ✓ 26 interaction assertions in ~4 seconds
975
+
976
+ npx aria-ease test --component menu
977
+ # ✓ 15 interaction assertions in ~2.8 seconds
978
+
979
+ npx aria-ease test # All components
980
+ # ✓ 80+ assertions in ~12 seconds
981
+ ```
982
+
983
+ **Why so fast?**
984
+
985
+ - Custom Playwright runner optimized for component testing
986
+ - Isolated test-harness architecture (no full app bootstrapping)
987
+ - Deterministic JSON contracts (no flaky selectors)
988
+ - Runs headless in CI
989
+
990
+ **Compare to manual testing:** Manually verifying keyboard interactions for a combobox (arrow keys, typing, Enter, Escape, Home/End, etc.) across browsers, verifying WAI-ARIA roles, states and properties = 20-30 minutes. Aria-Ease = 4 seconds.
991
+
992
+ ### The Moment of Truth
993
+
994
+ The first time you see that green check mark in your CI/CD pipeline—knowing that both static accessibility violations AND interaction behavior have been verified automatically—that's when it clicks.
995
+
996
+ **No one has any excuse to ship inaccessible code anymore.**
997
+
998
+ You've shifted accessibility left (into development), automated the verification, and made it a deployment gatekeeper. By the time code reaches manual testing, there should only be minute, non-automatable aspects left to verify.
999
+
1000
+ ---
1001
+
1002
+ ## �📖 More Resources
655
1003
 
656
1004
  - [Full Documentation](https://ariaease.site/docs)
657
1005
  - [GitHub Repository](https://github.com/aria-ease/aria-ease)
package/bin/cli.cjs CHANGED
@@ -1787,7 +1787,14 @@ program.command("audit").description("Run axe-core powered accessibility audit o
1787
1787
  } else if (format === "all") {
1788
1788
  await Promise.all(["json", "csv", "html"].map((format2) => createReport(format2)));
1789
1789
  }
1790
- console.log(import_chalk2.default.green("\n\u{1F389} All audits completed."));
1790
+ const totalViolations = allResults.reduce((sum, r) => {
1791
+ return sum + (r.result?.violations?.length || 0);
1792
+ }, 0);
1793
+ console.log(import_chalk2.default.red(`
1794
+ \u274C Accessibility violations found!`));
1795
+ console.log(import_chalk2.default.yellow(` ${totalViolations} violation${totalViolations !== 1 ? "s" : ""} detected across ${allResults.length} page${allResults.length !== 1 ? "s" : ""}.`));
1796
+ console.log(import_chalk2.default.gray(` Review the generated report for details.
1797
+ `));
1791
1798
  displayBadgeInfo("audit");
1792
1799
  await promptAddBadge("audit", process.cwd());
1793
1800
  console.log(import_chalk2.default.dim("\n" + "\u2500".repeat(60)));
@@ -1795,6 +1802,7 @@ program.command("audit").description("Run axe-core powered accessibility audit o
1795
1802
  console.log(import_chalk2.default.white(" \u2022 Star us on GitHub: ") + import_chalk2.default.blue.underline("https://github.com/aria-ease/aria-ease"));
1796
1803
  console.log(import_chalk2.default.white(" \u2022 Share feedback: ") + import_chalk2.default.blue.underline("https://github.com/aria-ease/aria-ease/discussions"));
1797
1804
  console.log(import_chalk2.default.dim("\u2500".repeat(60) + "\n"));
1805
+ process.exit(1);
1798
1806
  });
1799
1807
  program.command("test").description("Run core a11y accessibility standard tests on UI components").action(async () => {
1800
1808
  const { runTest: runTest2 } = await Promise.resolve().then(() => (init_test3(), test_exports2));
package/bin/cli.js CHANGED
@@ -221,7 +221,14 @@ program.command("audit").description("Run axe-core powered accessibility audit o
221
221
  } else if (format === "all") {
222
222
  await Promise.all(["json", "csv", "html"].map((format2) => createReport(format2)));
223
223
  }
224
- console.log(chalk.green("\n\u{1F389} All audits completed."));
224
+ const totalViolations = allResults.reduce((sum, r) => {
225
+ return sum + (r.result?.violations?.length || 0);
226
+ }, 0);
227
+ console.log(chalk.red(`
228
+ \u274C Accessibility violations found!`));
229
+ console.log(chalk.yellow(` ${totalViolations} violation${totalViolations !== 1 ? "s" : ""} detected across ${allResults.length} page${allResults.length !== 1 ? "s" : ""}.`));
230
+ console.log(chalk.gray(` Review the generated report for details.
231
+ `));
225
232
  displayBadgeInfo("audit");
226
233
  await promptAddBadge("audit", process.cwd());
227
234
  console.log(chalk.dim("\n" + "\u2500".repeat(60)));
@@ -229,6 +236,7 @@ program.command("audit").description("Run axe-core powered accessibility audit o
229
236
  console.log(chalk.white(" \u2022 Star us on GitHub: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease"));
230
237
  console.log(chalk.white(" \u2022 Share feedback: ") + chalk.blue.underline("https://github.com/aria-ease/aria-ease/discussions"));
231
238
  console.log(chalk.dim("\u2500".repeat(60) + "\n"));
239
+ process.exit(1);
232
240
  });
233
241
  program.command("test").description("Run core a11y accessibility standard tests on UI components").action(async () => {
234
242
  const { runTest } = await import("./test-BIYP2TGX.js");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aria-ease",
3
- "version": "6.4.4",
4
- "description": "Design, verify, and enforce accessible web development with ARIA component utilities, automated audits, component interaction testing, and CI/CD pipelines — all in one infrastructure.",
3
+ "version": "6.4.5",
4
+ "description": "Accessibility infrastructure for the entire frontend engineering lifecycle. Build accessible patterns, run automated audits, verify component interactions, and gate deployments — all in one system.",
5
5
  "main": "dist/index.cjs",
6
6
  "type": "module",
7
7
  "module": "dist/index.js",