Skip to content

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

Merged
brandonkelly merged 20 commits into5.0from
feature/dev-341-sources-sidebar-links-have
Nov 21, 2022
Merged

Update source navigation to use a navigation link list pattern#12054
brandonkelly merged 20 commits into5.0from
feature/dev-341-sources-sidebar-links-have

Conversation

@gcamacho079
Copy link
Copy Markdown
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
Copy Markdown

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.

2 participants