We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a83654f commit 708df10Copy full SHA for 708df10
src/components/search.js
@@ -10,12 +10,17 @@ import {LightTheme} from '../theme'
10
import {LinkNoUnderline} from './link'
11
import * as getNav from '../util/get-nav'
12
import omit from '../util/omit'
13
+import {announce} from '../util/aria-live'
14
15
const SearchResults = ({results, getItemProps, highlightedIndex}) => {
16
const siteMetadata = useSiteMetadata()
-
17
if (!results || results.length === 0) {
18
- return <Box sx={{fontSize: 2, px: 3, py: 3}}>No results</Box>
+ announce('No results')
19
+ return (
20
+ <Box sx={{fontSize: 2, px: 3, py: 3}} aria-live="polite">
21
+ No results
22
+ </Box>
23
+ )
24
}
25
26
return (
0 commit comments