Fix sidebar a11y issues#1295
Conversation
+ improved focus ring styling
* Selection outlines were cut off by the icon (which needs to be full height for the animation-
|
This pull request introduces 1 alert when merging 2a10f6b into 5a12f34 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
@ybnd : Thanks for this PR! Overall, it's much improved behavior, and running an accessibility scan (using Axe DevTools in my browser) shows the main issues are fixed.
However, I noticed a few small issues in testing this PR
- First, I no longer can open admin menu sections using the keyboard only. This works fine on the demo7.dspace.org site. Here's how to reproduce:
- Login
- Pin the sidebar (just to make it easier to see)
- Using the "Tab" key on your keyboard, highlight the "New" section header in the sidebar.
- Click "Enter" on keyboard. Nothing happens (on demo site, this section will open)
- NOTE however that if you click on a non-section link (like "Admin Search"), clicking "Enter" works correctly and brings you to the page. So, it's just the expandable sections that don't work correctly via keyboard only.
- A tiny issue. If you open one of the sections, like "New" and hover over a sub-link (e.g. "Community" or "Collection"), the title text all says "New menu section". Ideally, all links should have their own
title, so that they don't inherit the title of the section. This is more an annoyance though, so if it's hard to fix, we can leave the current behavior as-is.
Beyond that it's looking good. Thanks again!
|
@tdonohue thanks, I'll take a look at both issues soon! |
ybnd
left a comment
There was a problem hiding this comment.
Not sure how useful it is to have it be the same as the title of the link though.
Maybe it would make sense to add an optional tooltip field to the MenuItemModels and use that if it exists, fall back to text otherwise?
| [attr.aria-disabled]="!hasLink" | ||
| [title]="item.text" | ||
| [routerLink]="getRouterLink()" | ||
| (click)="$event.stopPropagation()" |
There was a problem hiding this comment.
Due to the [routerLink] above keyup.enter events could still propagate to parent expandable sections and toggle them.
This fixes that issue (@artlowel 👍)
tdonohue
left a comment
There was a problem hiding this comment.
@ybnd : I gave this another test today. The keyboard issue is fixed with the sidebar!
I did notice though that the other issue still isn't a perfect fix.
- Open the New menu
- Hover over "Community" with your mouse, and you'll see the title is now
menu.section.new_community. - Hover over "Collection" with your mouse, and you'll see the title is now
menu.section.new_collection - This is now the case for all sub-menu items. They all have missing titles.
The strange thing is that these keys all seem to exist in our src/assets/i18n/en.json5. So, I suspect you are just missing a lookup of the key value?
Beyond that, this is ready to go. Hopefully that's a quick (possibly even one line) fix.
|
@tdonohue Oh right, looks like I missed a |
References
Description
Address accessibility issues with the admin sidebar
Instructions for Reviewers
List of changes in this PR
<li>elements in sidebar's<ul><a>elementaria-expandedaria-disabledReviewing
Run deque a11y check
The sidebar should look & act the same as on
mainChecklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.