Skip to content
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

Fixing accessibility bug #3229

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Fixing accessibility bug #3229

merged 2 commits into from
Oct 15, 2024

Conversation

navya9singh
Copy link
Member

Fixing https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2187524
The PR fixes the incorrect name provided for "Handbook" button as "Handbook Close" Button.

@@ -102,7 +102,7 @@ export const Sidebar = (props: Props) => {
classes.push("closed")
}

const opened = { "aria-expanded": "true", "aria-label": item.title + " close" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming implies this button can "close" things (because it's opened), the closed variable below has "expand" because it can expand things. Where does the bug come into play?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It mentions that the Screen reader users will get incorrect information about the "Handbook button" as "Handbook Close Button

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if we add aria-expanded: false to closed? Does that provide a distinction in the screen reader?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, so I checked in the office hours, and they said that "aria-label" is not needed here since the button already has a name. Just making sure that "aria-expanded" is correctly set to true or false will be enough for the screen reader to produce the expected result.

@navya9singh navya9singh added the deploy-preview Enables automatic deployments to preview environments on a PR label Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

Azure Static Web Apps: Your stage site is ready! Visit it here: https://victorious-plant-05c166c10-3229.centralus.5.azurestaticapps.net

@navya9singh navya9singh merged commit 2d52c09 into v2 Oct 15, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy-preview Enables automatic deployments to preview environments on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants