Skip to content

Commit fef6ac7

Browse files
Trotttargos
authored andcommitted
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. PR-URL: #37031 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 36cc8df commit fef6ac7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎doc/template.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<header>
2626
<divclass="header-container">
2727
<h1>Node.js __VERSION__ Documentation</h1>
28-
<buttonclass="theme-toggle-btn" id="theme-toggle-btn" hidden>
28+
<buttonclass="theme-toggle-btn" id="theme-toggle-btn" aria-label="Toggle dark mode/light mode" hidden>
2929
<svgxmlns="http://www.w3.org/2000/svg" class="icon dark-icon" height="24" width="24">
3030
<pathfill="none" d="M0 0h24v24H0z" />
3131
<pathd="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)