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

fix(UIShell): use hr instead of li with role #14723

Merged
merged 2 commits into from
Sep 28, 2023

Conversation

tw15egan
Copy link
Member

Closes #14479

Refactors UI Shell Side Nav Separator to use an hr instead of a li with `role="separator" to fix an a11y issue

Changelog

Changed

  • changed li to hr, added styles to match current

Removed

  • unnecessary role

Testing / Reviewing

Run a11y checker on a UI Shell story with a side nav separator and ensure there are no violations

@tw15egan tw15egan marked this pull request as ready for review September 27, 2023 15:51
@tw15egan tw15egan requested a review from a team as a code owner September 27, 2023 15:51
@netlify
Copy link

netlify bot commented Sep 27, 2023

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 4334e09
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/65145617e0ba0400085032a3
😎 Deploy Preview https://deploy-preview-14723--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Sep 27, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 4334e09
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/65145617c46a8300083e570a
😎 Deploy Preview https://deploy-preview-14723--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@alisonjoseph
Copy link
Member

I don't believe it's valid html to have a hr as a child of ul
https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element

other than that it looks fine and doesn't have any a11y checker errors 🤔

Likely the correct html for this would require two separate lists with a hr in between (likely not a simple update)

@alisonjoseph
Copy link
Member

alisonjoseph commented Sep 27, 2023

@tw15egan
Copy link
Member Author

@alisonjoseph can we just wrap it in anli? We have buttons as nested elements in li for the nested menus, so I would imagine that's fine then?

@alisonjoseph
Copy link
Member

@tw15egan oh yea, good idea. I don't see why not 👍

@tw15egan
Copy link
Member Author

@alisonjoseph updated 👍

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

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

LGTM, no a11y errors

@github-actions github-actions bot added this pull request to the merge queue Sep 27, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Sep 28, 2023
@tay1orjones tay1orjones added this pull request to the merge queue Sep 28, 2023
Merged via the queue into carbon-design-system:main with commit 859cb7b Sep 28, 2023
18 checks passed
@carbon-automation
Copy link
Contributor

Hey there! v11.39.0 was just released that references this issue/PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[a11y]: SideNavDivider - role 'separator' is not valid for the element <li>
4 participants