Skip to content

Commit db9fe83

Browse files
committed
cleanup and clarity
1 parent 5152c28 commit db9fe83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/app/guides/accessibility-testing.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ cy.findByRole('img', { name: 'Cypress Logo' })
7575
```
7676
#### Asserting the accessible name of a button
7777

78-
A similar locator technique can be used with interactive elements like buttons:
78+
A similar accessibility-minded locator technique can be used with interactive elements like buttons:
7979

8080
```js
8181
// click the "Submit" button located with the `contains` Cypress command
@@ -93,7 +93,7 @@ There are some important differences to consider between locating specific HTML
9393

9494
#### Test IDs, Testing Library, and Accessibility
9595

96-
The use of `data-cy`-style test ID attributes to help with test stability has been a longstanding [best practice recommendation](/app/core-concepts/best-practices#Selecting-Elements) from Cypress. Test IDs are resilient to non-functional functional UI changes because they don't specify anything about the nature of the code or content itself, only that some element with that data attribute is present. When code changes, as long as the `data-cy` attributes are preserved in the right places, all the tests using them should continue to pass.
96+
The use of `data-cy`-style test ID attributes to help with test stability has been a longstanding [best practice recommendation](/app/core-concepts/best-practices#Selecting-Elements) by Cypress. Test IDs are resilient to non-functional functional UI changes because they don't specify anything about the nature of the code or content itself, only that some element with that data attribute is present. When code changes, as long as the `data-cy` attributes are preserved in the right places, all the tests using them should continue to pass.
9797

9898
This approach explicitly avoids testing accessibility - which is all about the nature and structure of the content being tested, and how well the implementation in code matches that content, to provide a functional experience in a range of assistive technologies and browser setups.
9999

0 commit comments

Comments
 (0)