File tree Expand file tree Collapse file tree 5 files changed +26
-19
lines changed
ReferenceDirectoryWithFilter Expand file tree Collapse file tree 5 files changed +26
-19
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const { link, title } = entry.data;
9
9
<a class =" banner-content" href ={ link } target =" _blank" >
10
10
<Content />
11
11
</a >
12
- <button id =" hideBanner" ><Icon kind =" close" ></button >
12
+ <button id =" hideBanner" aria-label = " Hide banner " ><Icon kind =" close" / ></button >
13
13
</div >
14
14
15
15
<script >
Original file line number Diff line number Diff line change @@ -20,16 +20,17 @@ export const JumpToLinks = ({
20
20
return (
21
21
< div class = { `${ styles . jumpto } ${ isOpen && "open" } ` } >
22
22
< button
23
- class = { styles . toggle }
24
- onClick = { handleToggle }
25
- aria-hidden = "true"
26
- tabIndex = { - 1 }
27
- >
28
- < span > { heading } </ span >
29
- < div class = "pt-[6px]" >
30
- < Icon kind = { isOpen ? "chevron-down" : "chevron-up" } />
31
- </ div >
32
- </ button >
23
+ class = { styles . toggle }
24
+ onClick = { handleToggle }
25
+ aria-expanded = { isOpen }
26
+ aria-label = { `${ heading } menu toggle` }
27
+ >
28
+ < span > { heading } </ span >
29
+ < div class = "pt-[6px]" >
30
+ < Icon kind = { isOpen ? "chevron-down" : "chevron-up" } />
31
+ </ div >
32
+ </ button >
33
+
33
34
{ isOpen && (
34
35
< ul >
35
36
{ links ?. map ( ( link ) => (
Original file line number Diff line number Diff line change @@ -43,11 +43,12 @@ export const MainNavLinks = ({
43
43
</ a >
44
44
45
45
< button
46
- class = { styles . toggle }
47
- onClick = { handleToggle }
48
- aria-hidden = "true"
49
- tabIndex = { - 1 }
50
- >
46
+ class = { styles . toggle }
47
+ onClick = { handleToggle }
48
+ aria-expanded = { isOpen }
49
+ aria-label = { mobileMenuLabel || "Toggle navigation menu" }
50
+ >
51
+
51
52
< div class = { styles . mobileMenuLabel } >
52
53
{ isOpen ? (
53
54
< Icon kind = "close" />
Original file line number Diff line number Diff line change @@ -221,9 +221,10 @@ export const ReferenceDirectoryWithFilter = ({
221
221
} }
222
222
/>
223
223
{ searchKeyword . length > 0 && (
224
- < button type = "reset" class = "" onClick = { clearInput } >
225
- < Icon kind = "close" className = "h-4 w-4" />
226
- </ button >
224
+ < button type = "reset" class = "" onClick = { clearInput } aria-label = "Clear search input" >
225
+ < Icon kind = "close" className = "h-4 w-4" />
226
+ </ button >
227
+
227
228
) }
228
229
</ div >
229
230
</ div >
Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ const SearchResults = ({
77
77
value = { category }
78
78
className = "capitalize"
79
79
onClick = { ( ) => toggleFilter ( category ) }
80
+ aria-pressed = { currentFilter === category }
81
+ aria-label = { `Filter by ${ uiTranslations [ uiTranslationKey ( category ) ] } ` }
80
82
>
81
83
< div class = "flex flex-nowrap gap-xs" >
82
84
{ uiTranslations [ uiTranslationKey ( category ) ] }
@@ -131,6 +133,7 @@ const SearchResults = ({
131
133
type = "submit"
132
134
class = "absolute right-0 top-[2px] px-[22px] py-[13px]"
133
135
onClick = { submitInput }
136
+ aria-label = "Submit search"
134
137
>
135
138
< Icon kind = "arrow-lg" />
136
139
</ button >
@@ -139,6 +142,7 @@ const SearchResults = ({
139
142
type = "reset"
140
143
class = "absolute right-0 top-0 px-[22px] py-[13px]"
141
144
onClick = { clearInput }
145
+ aria-label = "Clear search input"
142
146
>
143
147
< Icon kind = "close-lg" />
144
148
</ button >
You can’t perform that action at this time.
0 commit comments