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

Update source navigation to use a navigation link list pattern #12054

Merged
merged 20 commits into from Nov 21, 2022

Conversation

gcamacho079
Copy link
Contributor

Description

This PR updates the source navigation from using Garnish's Select class to using a more traditional navigation list.

  • Links are given the role of button, as they load new content onto the page
  • All items are moved into the default focus order via tabindex="0"
  • aria-current attributes are given to navigation items to specify the active item
  • A skip link is added before the link list
  • The text added to source toggles remains as "Show nested sources" instead of changing to "Hide nested sources". Previously it was read "Show nested sources, collapsed" and "Hide nested sources, expanded" for screen reader users. Keeping it as "Show nested sources" and toggling between expanded/collapsed is easier to understand.

Related issues

@linear
Copy link

linear bot commented Oct 4, 2022

DEV-341 Sources sidebar links have missing/incorrect roles

Sidebar links function as buttons, but have no associated role due to using anchor element with no href

Screen Shot 2022-03-17 at 4.19.21 PM.png

All sidebar "links" should be given the button role with the aria-current="true" attribute when active

Resolves CMS-054

@gcamacho079 gcamacho079 added the accessibility 👤 features related to accessibility label Nov 11, 2022
# Conflicts:
#	src/web/assets/cp/dist/cp.js
#	src/web/assets/cp/dist/cp.js.map
#	src/web/assets/cp/dist/css/cp.css
#	src/web/assets/cp/dist/css/cp.css.map
#	src/web/assets/pluginstore/dist/css/app.css
#	src/web/assets/pluginstore/dist/css/app.css.map
@brandonkelly brandonkelly merged commit 54182d4 into 5.0 Nov 21, 2022
@brandonkelly brandonkelly deleted the feature/dev-341-sources-sidebar-links-have branch November 21, 2022 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility 👤 features related to accessibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants