diff --git a/docs/dom-testing-library/api-helpers.md b/docs/dom-testing-library/api-helpers.md index 6c8934c20..1ebdf837b 100644 --- a/docs/dom-testing-library/api-helpers.md +++ b/docs/dom-testing-library/api-helpers.md @@ -77,7 +77,8 @@ for other popular assertion libraries: - [chai-dom](https://github.com/nathanboktae/chai-dom) -If you're aware of some other alternatives, please [make a pull request](https://github.com/testing-library/testing-library-docs/pulls) +If you're aware of some other alternatives, please +[make a pull request](https://github.com/testing-library/testing-library-docs/pulls) and add it here! ## `getNodeText` @@ -185,6 +186,19 @@ console.log(getRoles(nav)) // } ``` +## `isInaccessible` + +This function will compute if the given element should be excluded from the +accessibility API by the browser. It implements every **MUST** criteria from the +[Excluding Elements from the Accessibility Tree](https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion) +section in WAI-ARIA 1.2 with the exception of checking the `role` attribute. + +It is defined as: + +```typescript +function isInaccessible(element: Element): boolean +``` + ## Debugging When you use any `get` calls in your test cases, the current state of the