-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: add missing ARIA label for button #37031
Conversation
Fast-track to include it in #37020? |
@@ -25,7 +25,7 @@ | |||
<header> | |||
<div class="header-container"> | |||
<h1>Node.js __VERSION__ Documentation</h1> | |||
<button class="theme-toggle-btn" id="theme-toggle-btn" hidden> | |||
<button class="theme-toggle-btn" id="theme-toggle-btn" aria-label="Toggle dark mode/light mode" hidden> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<button class="theme-toggle-btn" id="theme-toggle-btn" aria-label="Toggle dark mode/light mode" hidden> | |
<button class="theme-toggle-btn" id="theme-toggle-btn" title="Toggle dark mode/light mode" hidden> |
No strong opinion, but title
also helps those who hover the element with their cursor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using title
attribute for a tooltip is generally undesirable from an accessibility point of view. It's possible that a lot (most? all?) of the relevant concerns may be addressed in this particular situation by also having the aria-label
attribute. But I'd want to look at it more closely. I'll add a tooltip in a follow-on PR (unless someone beats me to it).
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: nodejs#37031 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
Landed in 835b85d |
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 <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
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 <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
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.