Skip to content

Commit 70823a1

Browse files
committed
doc: add missing ARIA label for button
The button for toggling light mode and dark mode has no text display. Screen readers will read it as simply "button", making it not useful. Add an aria-label attribute so it gets a better description.
1 parent 2242cbb commit 70823a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<header>
2626
<div class="header-container">
2727
<h1>Node.js __VERSION__ Documentation</h1>
28-
<button class="theme-toggle-btn" id="theme-toggle-btn" hidden>
28+
<button class="theme-toggle-btn" id="theme-toggle-btn" aria-label="Toggle dark mode/light mode" hidden>
2929
<svg xmlns="http://www.w3.org/2000/svg" class="icon dark-icon" height="24" width="24">
3030
<path fill="none" d="M0 0h24v24H0z" />
3131
<path d="M11.1 12.08c-2.33-4.51-.5-8.48.53-10.07C6.27 2.2 1.98 6.59 1.98 12c0 .14.02.28.02.42.62-.27 1.29-.42 2-.42 1.66 0 3.18.83 4.1 2.15A4.01 4.01 0 0111 18c0 1.52-.87 2.83-2.12 3.51.98.32 2.03.5 3.11.5 3.5 0 6.58-1.8 8.37-4.52-2.36.23-6.98-.97-9.26-5.41z"/>

0 commit comments

Comments
 (0)