Skip to content

Commit

Permalink
docs: deprecate Page.accessibility (#16385)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed Aug 9, 2022
1 parent e725b5f commit d048822
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/src/api/class-accessibility.md
Expand Up @@ -2,6 +2,8 @@
* since: v1.8
* langs: csharp, js, python

**DEPRECATED** This class is deprecated. Please use other libraries such as [Axe](https://www.deque.com/axe/) if you need to test page accessibility. See our Node.js [guide](https://playwright.dev/docs/accessibility-testing) for integration with Axe.

The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by
assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or
[switches](https://en.wikipedia.org/wiki/Switch_access).
Expand Down Expand Up @@ -46,6 +48,8 @@ assistive technologies themselves. By default, Playwright tries to approximate t
- `orientation` <[string]> Whether the node is oriented horizontally or vertically, if applicable.
- `children` <[Array]<[Object]>> Child nodes, if any, if applicable.

**DEPRECATED** This method is deprecated. Please use other libraries such as [Axe](https://www.deque.com/axe/) if you need to test page accessibility. See our Node.js [guide](https://playwright.dev/docs/accessibility-testing) for integration with Axe.

Captures the current state of the accessibility tree. The returned object represents the root accessible node of the
page.

Expand Down
2 changes: 2 additions & 0 deletions docs/src/api/class-page.md
Expand Up @@ -560,6 +560,8 @@ page.
* langs: csharp, js, python
- type: <[Accessibility]>

**DEPRECATED** This property is deprecated. Please use other libraries such as [Axe](https://www.deque.com/axe/) if you need to test page accessibility. See our Node.js [guide](https://playwright.dev/docs/accessibility-testing) for integration with Axe.

## async method: Page.addInitScript
* since: v1.8

Expand Down
15 changes: 15 additions & 0 deletions packages/playwright-core/types/types.d.ts
Expand Up @@ -1723,6 +1723,12 @@ export interface Page {
*/
prependListener(event: 'worker', listener: (worker: Worker) => void): this;

/**
* **DEPRECATED** This property is deprecated. Please use other libraries such as [Axe](https://www.deque.com/axe/) if you
* need to test page accessibility. See our Node.js [guide](https://playwright.dev/docs/accessibility-testing) for
* integration with Axe.
* @deprecated
*/
accessibility: Accessibility;

/**
Expand Down Expand Up @@ -11089,6 +11095,10 @@ class TimeoutError extends Error {}
}

/**
* **DEPRECATED** This class is deprecated. Please use other libraries such as [Axe](https://www.deque.com/axe/) if you
* need to test page accessibility. See our Node.js [guide](https://playwright.dev/docs/accessibility-testing) for
* integration with Axe.
*
* The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by
* assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or
* [switches](https://en.wikipedia.org/wiki/Switch_access).
Expand All @@ -11105,6 +11115,10 @@ class TimeoutError extends Error {}
*/
export interface Accessibility {
/**
* **DEPRECATED** This method is deprecated. Please use other libraries such as [Axe](https://www.deque.com/axe/) if you
* need to test page accessibility. See our Node.js [guide](https://playwright.dev/docs/accessibility-testing) for
* integration with Axe.
*
* Captures the current state of the accessibility tree. The returned object represents the root accessible node of the
* page.
*
Expand Down Expand Up @@ -11137,6 +11151,7 @@ export interface Accessibility {
* }
* ```
*
* @deprecated
* @param options
*/
snapshot(options?: AccessibilitySnapshotOptions): Promise<null|AccessibilityNode>;
Expand Down

0 comments on commit d048822

Please sign in to comment.