@lessonkit/accessibility 0.9.3 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @lessonkit/accessibility
|
|
2
2
|
|
|
3
|
-
[](https://github.com/eddiethedean/lessonkit/actions/workflows/ci.yml)
|
|
4
|
-
[](https://lessonkit.readthedocs.io/en/latest/)
|
|
5
3
|
[](https://www.npmjs.com/package/@lessonkit/accessibility)
|
|
4
|
+
[](https://lessonkit.readthedocs.io/en/latest/reference/accessibility.html)
|
|
6
5
|
[](https://github.com/eddiethedean/lessonkit/blob/main/LICENSE)
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
**Docs:** [Accessibility reference](https://lessonkit.readthedocs.io/en/latest/reference/accessibility.html) · [Theming & accessibility guide](https://lessonkit.readthedocs.io/en/latest/guides/react-developers/theming-and-accessibility.html)
|
|
7
|
+
Focus management, reduced-motion helpers, and screen-reader utilities for LessonKit apps.
|
|
11
8
|
|
|
12
9
|
## Install
|
|
13
10
|
|
|
@@ -15,17 +12,23 @@ Small accessibility utilities used by LessonKit packages and apps.
|
|
|
15
12
|
npm install @lessonkit/accessibility
|
|
16
13
|
```
|
|
17
14
|
|
|
18
|
-
##
|
|
15
|
+
## API
|
|
16
|
+
|
|
17
|
+
| Export | Purpose |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| `prefersReducedMotion()` | Media-query check |
|
|
20
|
+
| `shouldAnimate({ default })` | Respect user preference |
|
|
21
|
+
| `focusFirst`, `getFocusableElements` | Focus discovery |
|
|
22
|
+
| `trapFocus(container, opts)` | Focus trap for modals |
|
|
23
|
+
| `createRovingTabIndex(opts)` | Roving tabindex groups |
|
|
24
|
+
| `visuallyHiddenStyle` | Screen-reader-only content |
|
|
25
|
+
|
|
26
|
+
Used internally by `@lessonkit/react` (e.g. `Quiz` labels).
|
|
27
|
+
|
|
28
|
+
## Docs
|
|
19
29
|
|
|
20
|
-
|
|
21
|
-
- `getReducedMotionPreference()`
|
|
22
|
-
- `shouldAnimate({ default })`
|
|
23
|
-
- `focusFirst(container)`
|
|
24
|
-
- `getFocusableElements(container)`
|
|
25
|
-
- `trapFocus(container, opts)`
|
|
26
|
-
- `createRovingTabIndex(opts)`
|
|
27
|
-
- `visuallyHiddenStyle` — inline styles for screen-reader-only content (used by `@lessonkit/react` `Quiz`)
|
|
30
|
+
[Accessibility reference](https://lessonkit.readthedocs.io/en/latest/reference/accessibility.html) · [Theming & accessibility guide](https://lessonkit.readthedocs.io/en/latest/guides/react-developers/theming-and-accessibility.html)
|
|
28
31
|
|
|
29
|
-
##
|
|
32
|
+
## License
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
Apache-2.0
|