Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Expose aria-invalid in ARIA Snapshots #34839

Open
foxable opened this issue Feb 18, 2025 · 0 comments
Open

[Feature]: Expose aria-invalid in ARIA Snapshots #34839

foxable opened this issue Feb 18, 2025 · 0 comments

Comments

@foxable
Copy link

foxable commented Feb 18, 2025

🚀 Feature Request

In order to allow testing form validation with ARIA snapshots, snapshots of input fields should include the invalid state, namely aria-invalid="true".

Example

Example input field:

<input type="text" value="Invalid value" aria-label="Label" aria-invalid="true" />

Potential ARIA snapshot:

- textbox "Label" [invalid]: Invalid value

Motivation

ARIA Snapshots are a great addition to Playwright, allowing to write assertions which include larger portions of the page, while also providing basic validation for the accessibility of features.

Forms and input fields are an important part of web applications and critical regarding accessibility. Being able to test them using ARIA snapshots including validation would enable testing forms with dependent form validations. In such scenarios, snapshotting the whole form would allow to reliably test dependent validations with a lower risk that later regressions affecting some form fields are missed.

@foxable foxable changed the title [Feature]: Explose aria-invalid in ARIA Snapshots [Feature]: Expose aria-invalid in ARIA Snapshots Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants