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
Import `accessibility-testing-toolkit` in your project once. The best place is to do it in your test setup file:
21
+
Import `accessibility-testing-toolkit/matchers` in your project once. The best place is to do it in your test setup file:
22
22
23
23
```js
24
24
// In your own jest-setup.js
25
-
import'accessibility-testing-toolkit';
25
+
import'accessibility-testing-toolkit/matchers';
26
26
27
27
// In jest.config.js add
28
28
setupFilesAfterEnv: ['<rootDir>/jest-setup.js'];
@@ -121,8 +121,8 @@ Container nodes in the DOM, such as non-semantic `<div>` and `<span>` elements,
121
121
122
122
When determining whether elements in the DOM are accessible, certain attributes and CSS properties signal that an element, along with its children, should not be considered visible:
123
123
124
-
- Elements with the `hidden` attribute or `aria-hidden="true"`.
125
-
- Styles that set `display: none` or `visibility: hidden`.
124
+
- Elements with the `hidden` attribute or `aria-hidden="true"`
125
+
- Styles that set `display: none` or `visibility: hidden`
126
126
127
127
In testing environments, relying on attribute checks may be necessary since `getComputedStyle` may not reflect styles defined in external stylesheets.
128
128
@@ -164,7 +164,6 @@ Specifically, the toolkit applies the following custom roles:
0 commit comments