aria-ease 3.0.3 → 4.0.0

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.
Files changed (42) hide show
  1. package/bin/cli.cjs +32 -0
  2. package/bin/cli.js +1 -1
  3. package/bin/{contractTestRunnerPlaywright-3VJUZSYK.js → contractTestRunnerPlaywright-EZLNNJV5.js} +32 -0
  4. package/bin/{test-D374H2ZS.js → test-45KMD4F4.js} +1 -1
  5. package/dist/{contractTestRunnerPlaywright-4UOHWGWD.js → contractTestRunnerPlaywright-UQQI5MYS.js} +32 -0
  6. package/dist/index.cjs +624 -1
  7. package/dist/index.d.cts +83 -2
  8. package/dist/index.d.ts +83 -2
  9. package/dist/index.js +589 -2
  10. package/dist/src/{Types.d-uG0Hm1yK.d.ts → Types.d-BrHSyS03.d.cts} +17 -0
  11. package/dist/src/{Types.d-uG0Hm1yK.d.cts → Types.d-BrHSyS03.d.ts} +17 -0
  12. package/dist/src/accordion/index.cjs +159 -0
  13. package/dist/src/accordion/index.d.cts +19 -2
  14. package/dist/src/accordion/index.d.ts +19 -2
  15. package/dist/src/accordion/index.js +159 -1
  16. package/dist/src/block/index.cjs +1 -1
  17. package/dist/src/block/index.d.cts +6 -2
  18. package/dist/src/block/index.d.ts +6 -2
  19. package/dist/src/block/index.js +1 -1
  20. package/dist/src/checkbox/index.cjs +129 -0
  21. package/dist/src/checkbox/index.d.cts +15 -2
  22. package/dist/src/checkbox/index.d.ts +15 -2
  23. package/dist/src/checkbox/index.js +129 -1
  24. package/dist/src/combobox/index.d.cts +1 -1
  25. package/dist/src/combobox/index.d.ts +1 -1
  26. package/dist/src/menu/index.cjs +32 -0
  27. package/dist/src/menu/index.d.cts +1 -1
  28. package/dist/src/menu/index.d.ts +1 -1
  29. package/dist/src/menu/index.js +32 -0
  30. package/dist/src/radio/index.cjs +122 -0
  31. package/dist/src/radio/index.d.cts +17 -2
  32. package/dist/src/radio/index.d.ts +17 -2
  33. package/dist/src/radio/index.js +122 -1
  34. package/dist/src/toggle/index.cjs +145 -0
  35. package/dist/src/toggle/index.d.cts +17 -2
  36. package/dist/src/toggle/index.d.ts +17 -2
  37. package/dist/src/toggle/index.js +145 -1
  38. package/dist/src/utils/test/{contractTestRunnerPlaywright-4UOHWGWD.js → contractTestRunnerPlaywright-UQQI5MYS.js} +32 -0
  39. package/dist/src/utils/test/contracts/MenuContract.json +0 -1
  40. package/dist/src/utils/test/index.cjs +32 -0
  41. package/dist/src/utils/test/index.js +1 -1
  42. package/package.json +1 -1
package/bin/cli.cjs CHANGED
@@ -13425,6 +13425,38 @@ async function runContractTestsPlaywright(componentName, url) {
13425
13425
  }
13426
13426
  }
13427
13427
  }
13428
+ let shouldSkipTest = false;
13429
+ for (const act of action) {
13430
+ if (act.type === "keypress" && (act.target === "submenuTrigger" || act.target === "submenu")) {
13431
+ const submenuSelector = componentContract.selectors[act.target];
13432
+ if (submenuSelector) {
13433
+ const submenuCount = await page.locator(submenuSelector).count();
13434
+ if (submenuCount === 0) {
13435
+ reporter.reportTest(dynamicTest, "skip", `Skipping test - ${act.target} element not found (optional submenu test)`);
13436
+ shouldSkipTest = true;
13437
+ break;
13438
+ }
13439
+ }
13440
+ }
13441
+ }
13442
+ if (!shouldSkipTest) {
13443
+ for (const assertion of assertions) {
13444
+ if (assertion.target === "submenu" || assertion.target === "submenuTrigger") {
13445
+ const submenuSelector = componentContract.selectors[assertion.target];
13446
+ if (submenuSelector) {
13447
+ const submenuCount = await page.locator(submenuSelector).count();
13448
+ if (submenuCount === 0) {
13449
+ reporter.reportTest(dynamicTest, "skip", `Skipping test - ${assertion.target} element not found (optional submenu test)`);
13450
+ shouldSkipTest = true;
13451
+ break;
13452
+ }
13453
+ }
13454
+ }
13455
+ }
13456
+ }
13457
+ if (shouldSkipTest) {
13458
+ continue;
13459
+ }
13428
13460
  for (const act of action) {
13429
13461
  if (act.type === "focus") {
13430
13462
  const focusSelector = componentContract.selectors[act.target];
package/bin/cli.js CHANGED
@@ -204,7 +204,7 @@ program.command("audit").description("Run axe-core powered accessibility audit o
204
204
  console.log(chalk.green("\n\u{1F389} All audits completed."));
205
205
  });
206
206
  program.command("test").description("Run core a11y accessibility standard tests on UI components").action(async () => {
207
- const { runTest } = await import("./test-D374H2ZS.js");
207
+ const { runTest } = await import("./test-45KMD4F4.js");
208
208
  runTest();
209
209
  });
210
210
  program.command("help").description("Display help information").action(() => {
@@ -152,6 +152,38 @@ async function runContractTestsPlaywright(componentName, url) {
152
152
  }
153
153
  }
154
154
  }
155
+ let shouldSkipTest = false;
156
+ for (const act of action) {
157
+ if (act.type === "keypress" && (act.target === "submenuTrigger" || act.target === "submenu")) {
158
+ const submenuSelector = componentContract.selectors[act.target];
159
+ if (submenuSelector) {
160
+ const submenuCount = await page.locator(submenuSelector).count();
161
+ if (submenuCount === 0) {
162
+ reporter.reportTest(dynamicTest, "skip", `Skipping test - ${act.target} element not found (optional submenu test)`);
163
+ shouldSkipTest = true;
164
+ break;
165
+ }
166
+ }
167
+ }
168
+ }
169
+ if (!shouldSkipTest) {
170
+ for (const assertion of assertions) {
171
+ if (assertion.target === "submenu" || assertion.target === "submenuTrigger") {
172
+ const submenuSelector = componentContract.selectors[assertion.target];
173
+ if (submenuSelector) {
174
+ const submenuCount = await page.locator(submenuSelector).count();
175
+ if (submenuCount === 0) {
176
+ reporter.reportTest(dynamicTest, "skip", `Skipping test - ${assertion.target} element not found (optional submenu test)`);
177
+ shouldSkipTest = true;
178
+ break;
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ if (shouldSkipTest) {
185
+ continue;
186
+ }
155
187
  for (const act of action) {
156
188
  if (act.type === "focus") {
157
189
  const focusSelector = componentContract.selectors[act.target];
@@ -12776,7 +12776,7 @@ Error: ${error instanceof Error ? error.message : String(error)}`
12776
12776
  URL must include protocol (e.g., "http://localhost:5173/test")`
12777
12777
  );
12778
12778
  }
12779
- const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-3VJUZSYK.js");
12779
+ const { runContractTestsPlaywright } = await import("./contractTestRunnerPlaywright-EZLNNJV5.js");
12780
12780
  contract = await runContractTestsPlaywright(componentName, url);
12781
12781
  } else {
12782
12782
  console.log(`\u{1F9EA} Running jsdom tests (limited event handling)`);
@@ -150,6 +150,38 @@ async function runContractTestsPlaywright(componentName, url) {
150
150
  }
151
151
  }
152
152
  }
153
+ let shouldSkipTest = false;
154
+ for (const act of action) {
155
+ if (act.type === "keypress" && (act.target === "submenuTrigger" || act.target === "submenu")) {
156
+ const submenuSelector = componentContract.selectors[act.target];
157
+ if (submenuSelector) {
158
+ const submenuCount = await page.locator(submenuSelector).count();
159
+ if (submenuCount === 0) {
160
+ reporter.reportTest(dynamicTest, "skip", `Skipping test - ${act.target} element not found (optional submenu test)`);
161
+ shouldSkipTest = true;
162
+ break;
163
+ }
164
+ }
165
+ }
166
+ }
167
+ if (!shouldSkipTest) {
168
+ for (const assertion of assertions) {
169
+ if (assertion.target === "submenu" || assertion.target === "submenuTrigger") {
170
+ const submenuSelector = componentContract.selectors[assertion.target];
171
+ if (submenuSelector) {
172
+ const submenuCount = await page.locator(submenuSelector).count();
173
+ if (submenuCount === 0) {
174
+ reporter.reportTest(dynamicTest, "skip", `Skipping test - ${assertion.target} element not found (optional submenu test)`);
175
+ shouldSkipTest = true;
176
+ break;
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
182
+ if (shouldSkipTest) {
183
+ continue;
184
+ }
153
185
  for (const act of action) {
154
186
  if (act.type === "focus") {
155
187
  const focusSelector = componentContract.selectors[act.target];