Skip to content

Commit 4170dbc

Browse files
authored
docs(bylabeltext): Fix capitalization (#865)
* Update bylabeltext.mdx Updated the example code for React and Cypress so it works properly. * Update bylabeltext.mdx Updated the examples so they are all capitalized the same way.
1 parent ad21363 commit 4170dbc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/queries/bylabeltext.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The example below will find the input node for the following DOM structures:
5050
// aria-label attributes
5151
// Take care because this is not a label that users can see on the page,
5252
// so the purpose of your input must be obvious to visual users.
53-
<input aria-label="username" />
53+
<input aria-label="Username" />
5454
```
5555

5656
<Tabs defaultValue="native" values={[ { label: 'Native', value: 'native', }, {
@@ -71,14 +71,14 @@ import { render, screen } from '@testing-library/react'
7171

7272
render(<Login />)
7373

74-
const inputNode = screen.getByLabelText('username')
74+
const inputNode = screen.getByLabelText('Username')
7575
```
7676

7777
</TabItem>
7878
<TabItem value="cypress">
7979

8080
```js
81-
cy.findByLabelText('username').should('exist')
81+
cy.findByLabelText('Username').should('exist')
8282
```
8383

8484
</TabItem>

0 commit comments

Comments
 (0)