Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: deprecate Page.accessibility #16177

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/src/api/class-accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* since: v1.8
* langs: csharp, js, python

**DEPRECATED** This class is deprecated. Please follow our [accessbility testing](../accessibility-testing.md) guide if you need to test page accessibility.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have accessibility-testing.md only for JS as of today. So either docslint or our docs site will end up being red if this lands.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's hold this until we have the docs and axe integration in all languages.


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 follow our [accessbility testing](../accessibility-testing.md) guide if you need to test page accessibility.

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
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ page.
* langs: csharp, js, python
- type: <[Accessibility]>

**DEPRECATED** This property is deprecated. Please follow our [accessbility testing](../accessibility-testing.md) guide if you need to test page accessibility.

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

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

/**
* **DEPRECATED** This property is deprecated. Please follow our [accessbility testing](https://playwright.dev/docs/accessibility-testing) guide
* if you need to test page accessibility.
* @deprecated
*/
accessibility: Accessibility;

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

/**
* **DEPRECATED** This class is deprecated. Please follow our [accessbility testing](https://playwright.dev/docs/accessibility-testing) guide if
* you need to test page accessibility.
*
* 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