You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page gathers public API of React Native Testing Library along with usage examples.
63
63
@@ -825,16 +825,20 @@ $ RNTL_SKIP_AUTO_DETECT_FAKE_TIMERS=true jest
825
825
826
826
## Accessibility
827
827
828
-
### `isInaccessible`
828
+
### `isHiddenFromAccessibility`
829
829
830
830
```ts
831
-
function isInaccessible(element:ReactTestInstance|null):boolean {}
831
+
function isHiddenFromAccessibility(
832
+
element:ReactTestInstance|null
833
+
):boolean {}
832
834
```
833
835
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.
835
839
836
840
:::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.
838
842
839
843
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.
0 commit comments