Skip to content

Commit 62d4446

Browse files
committed
fix: add aria-posinset and aria-setsize attributes to SearchResults for improved accessibility
1 parent 581915e commit 62d4446

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/search.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ const SearchResults = ({results, getItemProps, highlightedIndex}) => {
4444
as={LinkNoUnderline}
4545
to={item.path}
4646
active={highlightedIndex === index}
47-
aria-labelledby={null}
47+
aria-posinset={index + 1}
48+
aria-setsize={results.length}
4849
>
4950
<Box sx={{display: 'flex', flexDirection: 'column', flex: '0 0 auto'}}>
5051
<Text sx={{fontSize: 0}}>

0 commit comments

Comments
 (0)