Commit 708df10
authored
Accessibility#9196 (#1319)
## What/Why
- Screen reader does not announce the search result information as `No
results` on providing invalid input
## Changes
-
[`src/components/search.js`](https://github.com/npm/documentation/pull/1319/files#diff-995f95946b0cbf613b5cf5d8d6335cb1612dcb31907922cd5da28be90a6ff442)
> Add `aria-live` as `polite` to Box element
> Add `announce` function to trigger screen reader announcing the `No
results` message when there is no search result
## Before

## After
- The screen reader announces the search result information as `No
results` on providing invalid input
## References
- github/accessibility-audits#91961 parent a83654f commit 708df10
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
0 commit comments