docs: fix example for accessible description (#30672)
This commit is contained in:
parent
aa0020878a
commit
5d21e3729c
|
|
@ -21,7 +21,7 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
|
||||||
- [`method: LocatorAssertions.toHaveAccessibleDescription`] checks if the element has the specified accessible description:
|
- [`method: LocatorAssertions.toHaveAccessibleDescription`] checks if the element has the specified accessible description:
|
||||||
```js
|
```js
|
||||||
const locator = page.getByRole('button');
|
const locator = page.getByRole('button');
|
||||||
await expect(locator).toHaveAccessibleName('Upload the photo');
|
await expect(locator).toHaveAccessibleDescription('Upload a photo');
|
||||||
```
|
```
|
||||||
|
|
||||||
- [`method: LocatorAssertions.toHaveRole`] checks if the element has the specified ARIA role:
|
- [`method: LocatorAssertions.toHaveRole`] checks if the element has the specified ARIA role:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue