Skip to content

refactor: simplify accessibility smoke tests by removing disabled rules#293

Merged
yamcodes merged 1 commit intomainfrom
enable-a11y-rules-after-bumps
Nov 8, 2025
Merged

refactor: simplify accessibility smoke tests by removing disabled rules#293
yamcodes merged 1 commit intomainfrom
enable-a11y-rules-after-bumps

Conversation

@yamcodes
Copy link
Owner

@yamcodes yamcodes commented Nov 7, 2025

  • Removed specific disabled rules from the accessibility smoke tests to streamline the assertion process.
  • This change enhances the clarity of the tests and focuses on current accessibility compliance without known issues.

Summary by CodeRabbit

  • Refactor

    • Simplified accessibility violation assertion API by removing per-call configuration options.
  • Tests

    • Updated accessibility tests to align with the revised assertion interface.

- Removed specific disabled rules from the accessibility smoke tests to streamline the assertion process.
- This change enhances the clarity of the tests and focuses on current accessibility compliance without known issues.
@changeset-bot
Copy link

changeset-bot bot commented Nov 7, 2025

⚠️ No Changeset found

Latest commit: c2fac39

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Nov 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Nov 7, 2025 5:43pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 7, 2025

Walkthrough

The assertNoA11yViolations function signature was simplified by removing the optional options parameter that previously allowed per-call rule disabling. All test calls were updated to use the streamlined function signature without options.

Changes

Cohort / File(s) Summary
A11y test refactoring
tooling/playwright-www/tests/utils/a11y.ts, tooling/playwright-www/tests/a11y.test.ts
Removed optional options parameter from assertNoA11yViolations() function signature; updated test calls to remove the { disableRules: [...] } argument

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify all call sites to assertNoA11yViolations() have been updated to remove the options parameter
  • Confirm that the per-call rule disabling logic has been properly migrated or removed from the function implementation

Possibly related PRs

  • Accessibility tests #259: Introduced the assertNoA11yViolations function with per-call disabled-rules options; this PR removes that per-call configuration capability.

Suggested labels

tests

Poem

🐰 A11y's simpler now, you see,
Options stripped away with glee,
One way forward, clean and bright—
Accessibility shines more light! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: removing disabled rules from accessibility smoke tests to simplify them.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch enable-a11y-rules-after-bumps

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ed1837 and c2fac39.

📒 Files selected for processing (1)
  • tooling/playwright-www/tests/a11y.test.ts (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tooling/playwright-www/tests/a11y.test.ts (1)
tooling/playwright-www/tests/utils/a11y.ts (1)
  • assertNoA11yViolations (55-138)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test-e2e (e2e)
  • GitHub Check: test-e2e (a11y)
🔇 Additional comments (2)
tooling/playwright-www/tests/a11y.test.ts (2)

158-158: Inconsistency in AI-generated summary.

The AI summary states: "Function signature updated: assertNoA11yViolations(page) → previous signature was assertNoA11yViolations(page, options: { disableRules: string[] })"

However, the relevant code snippets show that assertNoA11yViolations in tooling/playwright-www/tests/utils/a11y.ts still accepts an optional options: AxeScanOptions = {} parameter. The function signature was not changed—only the call site was simplified by removing the options argument.


158-158: Verify that all accessibility rules pass without exceptions.

This change enables all default axe-core rules by removing the disableRules option. The function signature in utils/a11y.ts remains backward compatible (the options parameter is optional), and the change correctly simplifies the call.

However, previously disabled rules are now active, which may detect violations that were intentionally excluded. The tests need manual verification to confirm:

  1. The test suite passes with all rules enabled
  2. No new critical or serious violations are detected
  3. Any newly detected moderate/minor violations are either fixed or added to allowedViolations

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the tests This issue or PR is about adding, removing or changing tests label Nov 7, 2025
@yamcodes yamcodes merged commit 403ebb8 into main Nov 8, 2025
15 checks passed
@yamcodes yamcodes deleted the enable-a11y-rules-after-bumps branch November 8, 2025 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests This issue or PR is about adding, removing or changing tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant