Cypress Studio: Generate DOM selectors based on the ARIA role name & label #30309
Labels
experiment: studio
Issues when using experimentalStudio
type: accessibility ♿️
Improvements for accessibility
type: feature
New feature that does not currently exist
What would you like?
Current Behaviour
The generated test code locates the DOM elements via their class names.
Desired Behaviour
The generated test code locates the DOM elements via their ARIA role name and label combination.
The below example uses a DOM selector method from the @testing-library/cypress package, but any equivalent selector method is acceptable.
Why is this needed?
All of our page elements have ARIA role names and labels defined, which are also the most resilient to any future changes we make. Selecting by class names or
data-*
attributes is not a viable alternative for us.Therefore, we'd like to request for a feature to optionally generate the test code with DOM selectors that locates elements via their ARIA role name and label combinations. Alternatively, we'd like to see an interface where we could plugin our own selection logic or code generation patterns.
Other
No response
The text was updated successfully, but these errors were encountered: