Skip to content

Commit 3c28dd1

Browse files
navya9singhCopilot
andcommitted
fix: add aria-label to sidebar toggle button for accessibility
The #small-device-button-sidebar button only contained an SVG icon with no discernible text for screen readers. Added aria-label='Toggle sidebar navigation' to satisfy WCAG button-name rule. Fixes ADO Bug 2737374 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 32433bc commit 3c28dd1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/typescriptlang-org/src/components/layout

‎packages/typescriptlang-org/src/components/layout/Sidebar.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export const SidebarToggleButton = () => {
5454

5555

5656
return (
57-
<button id="small-device-button-sidebar" onClick={toggleClick}>
57+
<button id="small-device-button-sidebar" aria-label="Toggle sidebar navigation" onClick={toggleClick}>
5858
<svg fill="none" height="26" viewBox="0 0 26 26" width="26" xmlns="http://www.w3.org/2000/svg"><g fill="#fff"><path d="m0 1c0-.552285.447715-1 1-1h24c.5523 0 1 .447715 1 1v3h-26z" /><path d="m0 11h13 13v4h-26z" /><path d="m0 22h26v3c0 .5523-.4477 1-1 1h-24c-.552284 0-1-.4477-1-1z" /></g></svg>
5959
</button>
6060
)

0 commit comments

Comments
 (0)