OWASP / OWASP/Nest

Add Playwright-based a11y tests for color-contrast coverage

Open
#3,970 5 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
451
Forks
702
Avg merge
22h 59m
Merged PRs (30d)
91

Description

## 🎯 Issue Description

Our a11y tests use `jest-axe` in jsdom, which provides good coverage for structural checks (ARIA, semantics, headings, form labels). However, **axe's `color-contrast` rule doesn't work in jsdom** because jsdom can't compute CSS colors — contrast checks are silently skipped.

## 🛠️ Proposed Fix

Add Playwright-based a11y tests using `@axe-core/playwright` to run axe in a real browser, enabling full contrast validation in both light and dark themes.

**Are you going to work on implementing this?**

- [x] Yes
- [ ] No

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.