aria-ease 7.8.0 → 7.8.2
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 +9 -9
- package/dist/AccordionComponentStrategy-PGBPZ5AV.js +1 -0
- package/dist/CheckboxComponentStrategy-C4AE24NT.js +1 -0
- package/dist/ComboboxComponentStrategy-AAYXTWW2.js +5 -0
- package/dist/MenuComponentStrategy-XPVKRFYX.js +5 -0
- package/dist/RadioComponentStrategy-ATVI5I3L.js +1 -0
- package/dist/ToggleComponentStrategy-H737DAFU.js +1 -0
- package/dist/cli.cjs +56 -56
- package/dist/cli.js +1 -1
- package/dist/contractTestRunnerPlaywright-2KC3RAV5.js +46 -0
- package/dist/contractTestRunnerPlaywright-OZOFEW66.js +46 -0
- package/dist/index.cjs +30 -30
- package/dist/index.d.cts +2 -7
- package/dist/index.d.ts +2 -7
- package/dist/index.js +5 -5
- package/dist/src/{Types.d-BjBTlIzl.d.cts → Types.d-DO31Kt2y.d.cts} +2 -2
- package/dist/src/{Types.d-BjBTlIzl.d.ts → Types.d-DO31Kt2y.d.ts} +2 -2
- package/dist/src/accordion/index.d.cts +1 -1
- package/dist/src/accordion/index.d.ts +1 -1
- package/dist/src/block/index.d.cts +1 -1
- package/dist/src/block/index.d.ts +1 -1
- package/dist/src/checkbox/index.d.cts +1 -1
- package/dist/src/checkbox/index.d.ts +1 -1
- package/dist/src/combobox/index.cjs +1 -1
- package/dist/src/combobox/index.d.cts +1 -1
- package/dist/src/combobox/index.d.ts +1 -1
- package/dist/src/combobox/index.js +1 -1
- package/dist/src/menu/index.d.cts +1 -1
- package/dist/src/menu/index.d.ts +1 -1
- package/dist/src/radio/index.d.cts +1 -1
- package/dist/src/radio/index.d.ts +1 -1
- package/dist/src/tabs/index.d.cts +1 -1
- package/dist/src/tabs/index.d.ts +1 -1
- package/dist/src/toggle/index.d.cts +1 -1
- package/dist/src/toggle/index.d.ts +1 -1
- package/dist/src/utils/test/AccordionComponentStrategy-3GGMDTRW.js +1 -0
- package/dist/src/utils/test/CheckboxComponentStrategy-VVOJGXVS.js +1 -0
- package/dist/src/utils/test/ComboboxComponentStrategy-27RZ5MBQ.js +5 -0
- package/dist/src/utils/test/MenuComponentStrategy-C7WC6OXZ.js +5 -0
- package/dist/src/utils/test/RadioComponentStrategy-4KONDPM2.js +1 -0
- package/dist/src/utils/test/ToggleComponentStrategy-DKEYKK47.js +1 -0
- package/dist/src/utils/test/contractTestRunnerPlaywright-GM4W4SKJ.js +46 -0
- package/dist/src/utils/test/dsl/index.cjs +1 -1
- package/dist/src/utils/test/dsl/index.d.cts +0 -5
- package/dist/src/utils/test/dsl/index.d.ts +0 -5
- package/dist/src/utils/test/dsl/index.js +1 -1
- package/dist/src/utils/test/index.cjs +29 -29
- package/dist/src/utils/test/index.d.cts +3 -3
- package/dist/src/utils/test/index.d.ts +3 -3
- package/dist/src/utils/test/index.js +1 -1
- package/dist/{test-TZFBWFCP.js → test-6TU4J43V.js} +1 -1
- package/package.json +1 -1
- package/dist/AccordionComponentStrategy-T5YODP3A.js +0 -1
- package/dist/CheckboxComponentStrategy-AZF2Y4MN.js +0 -1
- package/dist/ComboboxComponentStrategy-DHZS4NW6.js +0 -5
- package/dist/MenuComponentStrategy-L3QXLC6S.js +0 -5
- package/dist/RadioComponentStrategy-GKA5KOM5.js +0 -1
- package/dist/ToggleComponentStrategy-TMRNXFSL.js +0 -1
- package/dist/contractTestRunnerPlaywright-CJFYO766.js +0 -46
- package/dist/contractTestRunnerPlaywright-OB2GWGOA.js +0 -46
- package/dist/src/utils/test/AccordionComponentStrategy-S35ZYITU.js +0 -1
- package/dist/src/utils/test/CheckboxComponentStrategy-ST2DWNYT.js +0 -1
- package/dist/src/utils/test/ComboboxComponentStrategy-5AWO63DA.js +0 -5
- package/dist/src/utils/test/MenuComponentStrategy-QHVBLUBR.js +0 -5
- package/dist/src/utils/test/RadioComponentStrategy-TWMIMSYX.js +0 -1
- package/dist/src/utils/test/ToggleComponentStrategy-UOGYK2U4.js +0 -1
- package/dist/src/utils/test/contractTestRunnerPlaywright-ZKVK7KUM.js +0 -46
package/README.md
CHANGED
|
@@ -13,12 +13,12 @@ Stop treating accessibility as an afterthought. Aria-Ease engineers accessibilit
|
|
|
13
13
|
|
|
14
14
|
Aria-Ease isn't a utility library. **It's an accessibility infrastructure** that integrates into every phase of your frontend engineering lifecycle:
|
|
15
15
|
|
|
16
|
-
| Phase | Feature |
|
|
17
|
-
| ------------------ | --------------------------------------------- |
|
|
18
|
-
| **🔧 Development** | Component utilities for accessible patterns |
|
|
19
|
-
| **🔍 Pre-Deploy** | Axe-core powered static accessibility audit |
|
|
20
|
-
| **🧪 Testing** | WAI-ARIA APG contract testing with Playwright |
|
|
21
|
-
| **🚀 CI/CD** | Accessibility as deployment gatekeeper |
|
|
16
|
+
| Phase | Feature | Impact |
|
|
17
|
+
| ------------------ | --------------------------------------------- | --------------------------------------------- |
|
|
18
|
+
| **🔧 Development** | Component utilities for accessible patterns | Build it right from the start |
|
|
19
|
+
| **🔍 Pre-Deploy** | Axe-core powered static accessibility audit | Verify before it ships |
|
|
20
|
+
| **🧪 Testing** | WAI-ARIA APG contract testing with Playwright | Fast, determinic component accessibility test |
|
|
21
|
+
| **🚀 CI/CD** | Accessibility as deployment gatekeeper | Block inaccessible code from production |
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -358,7 +358,7 @@ useEffect(() => {
|
|
|
358
358
|
}, []);
|
|
359
359
|
|
|
360
360
|
// Programmatically control
|
|
361
|
-
comboboxRef.current.
|
|
361
|
+
comboboxRef.current.openListBox(); // Open the listbox
|
|
362
362
|
comboboxRef.current.refresh(); // Refresh the cache after dynamically adding/removing a listbox option item
|
|
363
363
|
|
|
364
364
|
// Vanilla JS Example
|
|
@@ -376,8 +376,8 @@ const combobox = Combobox.makeComboboxAccessible({
|
|
|
376
376
|
});
|
|
377
377
|
|
|
378
378
|
// Programmatically control
|
|
379
|
-
combobox.
|
|
380
|
-
combobox.
|
|
379
|
+
combobox.openListBox();
|
|
380
|
+
combobox.closeListBox();
|
|
381
381
|
|
|
382
382
|
// If you dynamically add/remove listbox option items, refresh the cache
|
|
383
383
|
combobox.refresh();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-SM6ZKEDR.js";import"./chunk-CNU4N4AY.js";var n=class{constructor(t,e,i,s){this.mainSelector=t;this.selectors=e;this.actionTimeoutMs=i;this.assertionTimeoutMs=s}async resetState(t){if(!this.selectors.panel||!this.selectors.trigger)return;let e=this.selectors.trigger,i=this.selectors.panel;if(!e||!i)return;let s=await t.locator(e).all();for(let r of s){let c=await r.getAttribute("aria-expanded")==="true",a=await r.getAttribute("aria-controls");if(c&&a){await r.click({timeout:this.actionTimeoutMs});let l=t.locator(`#${a}`);await(0,o.expect)(l).toBeHidden({timeout:this.assertionTimeoutMs}).catch(()=>{})}}}async shouldSkipTest(){return!1}getMainSelector(){return this.mainSelector}};export{n as AccordionComponentStrategy};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-SM6ZKEDR.js";import"./chunk-CNU4N4AY.js";var i=class{constructor(e,o,s,t){this.mainSelector=e;this.selectors=o;this.actionTimeoutMs=s;this.assertionTimeoutMs=t}async resetState(e){if(!this.selectors.checkbox||!this.selectors.relative)return;let o=this.selectors.checkbox;if(!o)return;let s=await e.locator(o).all();for(let t of s)if(await t.getAttribute("aria-checked")==="true"){await t.click({timeout:this.actionTimeoutMs});let c=e.locator(`#${t}`);await(0,r.expect)(c).toHaveAttribute("aria-checked","false",{timeout:this.assertionTimeoutMs}).catch(()=>{})}}async shouldSkipTest(){return!1}getMainSelector(){return this.mainSelector}};export{i as CheckboxComponentStrategy};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as s}from"./chunk-SM6ZKEDR.js";import"./chunk-CNU4N4AY.js";var r=class{constructor(t,i,o,c){this.mainSelector=t;this.selectors=i;this.actionTimeoutMs=o;this.assertionTimeoutMs=c}async resetState(t){if(!this.selectors.popup)return;let i=this.selectors.popup,o=t.locator(i).first();if(!await o.isVisible().catch(()=>!1))return;let e=!1,n=this.selectors.main;if(n&&(await t.locator(n).first().focus(),await t.keyboard.press("Escape"),e=await(0,s.expect)(o).toBeHidden({timeout:this.assertionTimeoutMs}).then(()=>!0).catch(()=>!1)),!e&&this.selectors.button&&(await t.locator(this.selectors.button).first().click({timeout:this.actionTimeoutMs}),e=await(0,s.expect)(o).toBeHidden({timeout:this.assertionTimeoutMs}).then(()=>!0).catch(()=>!1)),e||(await t.mouse.click(10,10),e=await(0,s.expect)(o).toBeHidden({timeout:this.assertionTimeoutMs}).then(()=>!0).catch(()=>!1)),!e)throw new Error(`\u274C FATAL: Cannot close combobox popup between tests. Popup remains visible after trying:
|
|
2
|
+
1. Escape key
|
|
3
|
+
2. Clicking button
|
|
4
|
+
3. Clicking outside
|
|
5
|
+
This indicates a problem with the combobox component's close functionality.`);this.selectors.input&&await t.locator(this.selectors.input).first().clear()}async shouldSkipTest(){return!1}getMainSelector(){return this.mainSelector}};export{r as ComboboxComponentStrategy};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as r}from"./chunk-SM6ZKEDR.js";import"./chunk-CNU4N4AY.js";var c=class{constructor(e,o,i,n){this.mainSelector=e;this.selectors=o;this.actionTimeoutMs=i;this.assertionTimeoutMs=n}async resetState(e){if(!this.selectors.popup)return;let o=this.selectors.popup,i=e.locator(o).first();if(!await i.isVisible().catch(()=>!1))return;let s=!1,t=this.selectors.main;if(t&&(await e.locator(t).first().focus(),await e.keyboard.press("Escape"),s=await(0,r.expect)(i).toBeHidden({timeout:this.assertionTimeoutMs}).then(()=>!0).catch(()=>!1)),!s&&this.selectors.main&&(await e.locator(this.selectors.main).first().click({timeout:this.actionTimeoutMs}),s=await(0,r.expect)(i).toBeHidden({timeout:this.assertionTimeoutMs}).then(()=>!0).catch(()=>!1)),s||(await e.mouse.click(10,10),s=await(0,r.expect)(i).toBeHidden({timeout:this.assertionTimeoutMs}).then(()=>!0).catch(()=>!1)),!s)throw new Error(`\u274C FATAL: Cannot close menu between tests. Menu remains visible after trying:
|
|
2
|
+
1. Escape key
|
|
3
|
+
2. Clicking trigger
|
|
4
|
+
3. Clicking outside
|
|
5
|
+
This indicates a problem with the menu component's close functionality.`);this.selectors.input&&await e.locator(this.selectors.input).first().clear(),this.selectors.main&&await e.locator(this.selectors.main).first().focus()}async shouldSkipTest(e,o){if(!(e.action.some(t=>t.target==="submenu"||t.target==="submenuTrigger"||t.target==="submenuItems")||e.assertions.some(t=>t.target==="submenu"||t.target==="submenuTrigger"||t.target==="submenuItems")))return!1;let n=this.selectors.submenuTrigger;return n?await o.locator(n).count()===0:!0}getMainSelector(){return this.mainSelector}};export{c as MenuComponentStrategy};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-SM6ZKEDR.js";import"./chunk-CNU4N4AY.js";var a=class{constructor(e,o,i,t){this.mainSelector=e;this.selectors=o;this.actionTimeoutMs=i;this.assertionTimeoutMs=t}async resetState(e){if(!this.selectors.radio||!this.selectors.relative)return;let o=this.selectors.radio;if(!o)return;let i=await e.locator(o).all();for(let t of i)if(await t.getAttribute("aria-checked")==="true"){await t.evaluate(c=>c.setAttribute("aria-checked","false"),{timeout:this.actionTimeoutMs});let s=e.locator(`#${t}`);await(0,r.expect)(s).toHaveAttribute("aria-checked","false",{timeout:this.assertionTimeoutMs}).catch(()=>{})}}async shouldSkipTest(){return!1}getMainSelector(){return this.mainSelector}};export{a as RadioComponentStrategy};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-SM6ZKEDR.js";import"./chunk-CNU4N4AY.js";var i=class{constructor(e,o,s,t){this.mainSelector=e;this.selectors=o;this.actionTimeoutMs=s;this.assertionTimeoutMs=t}async resetState(e){if(!this.selectors.toggle||!this.selectors.relative)return;let o=this.selectors.toggle;if(!o)return;let s=await e.locator(o).all();for(let t of s)if(await t.getAttribute("aria-pressed")==="true"){await t.click({timeout:this.actionTimeoutMs});let a=e.locator(`#${t}`);await(0,r.expect)(a).toHaveAttribute("aria-pressed","false",{timeout:this.assertionTimeoutMs}).catch(()=>{})}}async shouldSkipTest(){return!1}getMainSelector(){return this.mainSelector}};export{i as ToggleComponentStrategy};
|