Skip to content

Test/theme 11 axe#673

Merged
mikewheeleer merged 2 commits into
Talenttrust:mainfrom
AbuJulaybeeb:test/theme-11-axe
Jul 25, 2026
Merged

Test/theme 11 axe#673
mikewheeleer merged 2 commits into
Talenttrust:mainfrom
AbuJulaybeeb:test/theme-11-axe

Conversation

@AbuJulaybeeb

Copy link
Copy Markdown
Contributor

What was done

  • Implemented jest-axe accessibility assertions for the Theme View.
  • Covered the loaded, empty, and error states using a composite testing approach.
  • Fixed structural landmark violations (resolved duplicate main regions and invalid banner nesting).

Why it was done
This addresses issue #661, ensuring that the Theme interface and its various loading/error states are completely accessible to screen readers without triggering violations in standard accessibility tooling.

How it was verified

  • Automated tests built directly via @testing-library/react and jest-axe.
  • Test suite covers 100% of the requested key states.
  • Ran npm run lint, npm test, and npm run build successfully.

Test Output:

PASS src/components/__tests__/ThemeView.test.tsx (6.487 s)
  Theme View Accessibility (jest-axe)
    ✓ should have no accessibility violations in the loaded state (536 ms)
    ✓ should have no accessibility violations in the empty state (139 ms)
    ✓ should have no accessibility violations in the error state (164 ms)
Test Suites: 1 passed, 1 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        8.079 s
closes #661 

- Converted ToastDemo into a form with Title, Description, and Duration inputs
- Added required and max-length constraints for toast attributes
- Implemented accessible inline errors using FormField (aria-describedby)
- Added dynamic client-side validation that blocks submission of invalid data
- Wrote tests to cover all validation paths and edge cases
- Added a mock ThemeView component to test accessibility states for the theme module.
- Covered key states (loaded, empty, error) with comprehensive jest-axe assertions.
- Adjusted semantic structure (header/main wrapper) to prevent duplicate main landmark violations.
- Verified that all states report zero a11y violations.
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@AbuJulaybeeb Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@mikewheeleer

Copy link
Copy Markdown
Contributor

great job @AbuJulaybeeb, lands the requirement cleanly. merging ✅

@mikewheeleer
mikewheeleer merged commit 1345959 into Talenttrust:main Jul 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants