Skip to content

Commit 585d4b8

Browse files
committed
docs: update docs
1 parent 172ab2c commit 585d4b8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

website/docs/API.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ title: API
5757
- [`RNTL_SKIP_AUTO_CLEANUP`](#rntl_skip_auto_cleanup)
5858
- [`RNTL_SKIP_AUTO_DETECT_FAKE_TIMERS`](#rntl_skip_auto_detect_fake_timers)
5959
- [Accessibility](#accessibility)
60-
- [`isInaccessible`](#isinaccessible)
60+
- [`isHiddenFromAccessibility`](#ishiddenfromaccessibility)
6161

6262
This page gathers public API of React Native Testing Library along with usage examples.
6363

@@ -825,16 +825,20 @@ $ RNTL_SKIP_AUTO_DETECT_FAKE_TIMERS=true jest
825825

826826
## Accessibility
827827

828-
### `isInaccessible`
828+
### `isHiddenFromAccessibility`
829829

830830
```ts
831-
function isInaccessible(element: ReactTestInstance | null): boolean {}
831+
function isHiddenFromAccessibility(
832+
element: ReactTestInstance | null
833+
): boolean {}
832834
```
833835

834-
Checks if given element is hidden from assistive technology, e.g. screen readers.
836+
Also available as `isInaccessible()` alias for React Testing Library compatibility.
837+
838+
Checks if given element is hidden from assistive technology, e.g. screen readers.
835839

836840
:::note
837-
Like [`isInaccessible`](https://testing-library.com/docs/dom-testing-library/api-accessibility/#isinaccessible) function from [DOM Testing Library](https://testing-library.com/docs/dom-testing-library/intro) this function considers both accessibility elements and presentational elements (regular `View`s) to be accessible, unless they are hidden in terms of host platform.
841+
Like [`isInaccessible`](https://testing-library.com/docs/dom-testing-library/api-accessibility/#isinaccessible) function from DOM Testing Library this function considers both accessibility elements and presentational elements (regular `View`s) to be accessible, unless they are hidden in terms of host platform.
838842

839843
This covers only part of [ARIA notion of Accessiblity Tree](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion), as ARIA excludes both hidden and presentational elements from the Accessibility Tree.
840844
:::

0 commit comments

Comments
 (0)