File tree Expand file tree Collapse file tree 5 files changed +32
-28
lines changed
ReferenceDirectoryWithFilter Expand file tree Collapse file tree 5 files changed +32
-28
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const { link, title } = entry.data;
99 <a class =" banner-content" href ={ link } target =" _blank" >
1010 <Content />
1111 </a >
12- <button id =" hideBanner" ><Icon kind =" close" ></button >
12+ <button id =" hideBanner" aria-label = " Hide banner " ><Icon kind =" close" / ></button >
1313</div >
1414
1515<script >
Original file line number Diff line number Diff line change @@ -22,14 +22,15 @@ export const JumpToLinks = ({
2222 < button
2323 class = { styles . toggle }
2424 onClick = { handleToggle }
25- aria-hidden = "true"
26- tabIndex = { - 1 }
25+ aria-expanded = { isOpen }
26+ aria-label = { ` ${ heading } menu toggle` }
2727 >
2828 < span > { heading } </ span >
2929 < div class = "pt-[6px]" >
3030 < Icon kind = { isOpen ? "chevron-down" : "chevron-up" } />
3131 </ div >
3232 </ button >
33+
3334 { isOpen && (
3435 < ul >
3536 { links ?. map ( ( link ) => (
Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ export const MainNavLinks = ({
4545 < button
4646 class = { styles . toggle }
4747 onClick = { handleToggle }
48- aria-hidden = "true"
49- tabIndex = { - 1 }
48+ aria-expanded = { isOpen }
49+ aria-label = { mobileMenuLabel || "Toggle navigation menu" }
5050 >
5151 < div class = { styles . mobileMenuLabel } >
5252 { isOpen ? (
@@ -79,26 +79,24 @@ export const MainNavLinks = ({
7979 </ li >
8080 ) ) }
8181 </ ul >
82- {
83- < ul class = "flex flex-col gap-[15px]" >
84- < li >
85- < a className = { styles . buttonlink } href = "https://editor.p5js.org" >
86- < div class = "mr-xxs" >
87- < Icon kind = "code-brackets" />
88- </ div >
89- { editorButtonLabel }
90- </ a >
91- </ li >
92- < li >
93- < a className = { styles . buttonlink } href = "/donate/" >
94- < div class = "mr-xxs" >
95- < Icon kind = "heart" />
96- </ div >
97- { donateButtonLabel }
98- </ a >
99- </ li >
100- </ ul >
101- }
82+ < ul class = "flex flex-col gap-[15px]" >
83+ < li >
84+ < a className = { styles . buttonlink } href = "https://editor.p5js.org" >
85+ < div class = "mr-xxs" >
86+ < Icon kind = "code-brackets" />
87+ </ div >
88+ { editorButtonLabel }
89+ </ a >
90+ </ li >
91+ < li >
92+ < a className = { styles . buttonlink } href = "/donate/" >
93+ < div class = "mr-xxs" >
94+ < Icon kind = "heart" />
95+ </ div >
96+ { donateButtonLabel }
97+ </ a >
98+ </ li >
99+ </ ul >
102100 </ div >
103101 ) ;
104102} ;
Original file line number Diff line number Diff line change @@ -221,9 +221,10 @@ export const ReferenceDirectoryWithFilter = ({
221221 } }
222222 />
223223 { 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+
227228 ) }
228229 </ div >
229230 </ div >
Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ const SearchResults = ({
7777 value = { category }
7878 className = "capitalize"
7979 onClick = { ( ) => toggleFilter ( category ) }
80+ aria-pressed = { currentFilter === category }
81+ aria-label = { `Filter by ${ uiTranslations [ uiTranslationKey ( category ) ] } ` }
8082 >
8183 < div class = "flex flex-nowrap gap-xs" >
8284 { uiTranslations [ uiTranslationKey ( category ) ] }
@@ -131,6 +133,7 @@ const SearchResults = ({
131133 type = "submit"
132134 class = "absolute right-0 top-[2px] px-[22px] py-[13px]"
133135 onClick = { submitInput }
136+ aria-label = "Submit search"
134137 >
135138 < Icon kind = "arrow-lg" />
136139 </ button >
@@ -139,6 +142,7 @@ const SearchResults = ({
139142 type = "reset"
140143 class = "absolute right-0 top-0 px-[22px] py-[13px]"
141144 onClick = { clearInput }
145+ aria-label = "Clear search input"
142146 >
143147 < Icon kind = "close-lg" />
144148 </ button >
You can’t perform that action at this time.
0 commit comments