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

SideNavigation a11y fix #1496

Merged
merged 19 commits into from
Aug 21, 2023
Merged

SideNavigation a11y fix #1496

merged 19 commits into from
Aug 21, 2023

Conversation

xman343
Copy link
Contributor

@xman343 xman343 commented Aug 15, 2023

Changes

#1148 - All SideNavigation examples are failing due to button-name Axe violations. In all examples it occurs in the expand button, and in SubmenuExample it also occurs in the settings button within the submenu. The examples and / or component will be modified to resolve these rule violations.

  • Passing solution: Button name added by implementing label Expand or collapse side menu in the expand button in SideNavigation.
  • Passing solution: Button name added to SubMenuExample SubMenu Settings Button through label Submenu settings.

Testing

Testing will be conducted through the Cypress web a11y script. Any breaking changes will be evaluated through unit testing & visual tests.

I am also reading the examples with NVDA to assess their screen reader compatibility.

Docs

N/A

@xman343 xman343 self-assigned this Aug 16, 2023
@xman343 xman343 added the a11y Accessibility issues (keyboard navigation, color contrast, assistive technologies, semantics, etc) label Aug 16, 2023
@xman343
Copy link
Contributor Author

xman343 commented Aug 16, 2023

I'm still conflicted on the label for the expand button. "Expand or collapse side menu" describes both of the actions that the user is meant to perform with the element, but I fear that it ironically runs the risk of making the button's purpose confusing.

"Toggle" was another idea I had, but it's kind of vague as to what exactly it's toggling. I could have it as "Toggle side menu," but then the question is... toggle what about the side menu, exactly?

I could just leave it as "Expand side menu," and the user would likely assume that the button would also collapse the side menu if it's already expanded (a common design pattern), but again, I don't want to run the risk of being too vague.

I have the label as "Expand or collapse side menu" for now because I'd rather run the risk of giving too much information at first than not enough. It's less work to have the full intent established before we whittle it down into something better, than to build something new from the ground up imo.

@xman343
Copy link
Contributor Author

xman343 commented Aug 16, 2023

On another note: even when the expand button has an accessible label, my other concern now is that it doesn't read out whether the side menu is expanded or collapsed, when I'm pretty sure that widgets like this are supposed to read out their expand/collapse status. Even though the purpose for this particular example is just to reveal the text labels for each button, I feel that it's still important to communicate that context to the user.

@xman343 xman343 marked this pull request as ready for review August 16, 2023 14:22
@xman343 xman343 requested review from a team as code owners August 16, 2023 14:22
@xman343 xman343 requested review from mayank99 and r100-stack and removed request for a team August 16, 2023 14:22
examples/SideNavigation.submenu.tsx Outdated Show resolved Hide resolved
.changeset/polite-eels-unite.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mayank99 mayank99 left a comment

Choose a reason for hiding this comment

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

LGTM. i believe your concerns from above have been addressed now

@mayank99 mayank99 added this pull request to the merge queue Aug 18, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 18, 2023
@mayank99 mayank99 merged commit 2627a69 into dev Aug 21, 2023
4 checks passed
@mayank99 mayank99 deleted the xander/sidenavigation-a11y-fix branch August 21, 2023 13:12
@imodeljs-admin imodeljs-admin mentioned this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Accessibility issues (keyboard navigation, color contrast, assistive technologies, semantics, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants