-
Notifications
You must be signed in to change notification settings - Fork 437
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 sidebar a11y issues #1295
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 MenuItemModel
s and use that if it exists, fall back to text
otherwise?
@@ -3,6 +3,8 @@ | |||
[attr.aria-disabled]="!hasLink" | |||
[title]="item.text" | |||
[routerLink]="getRouterLink()" | |||
(click)="$event.stopPropagation()" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to the [routerLink]
above keyup.enter
events could still propagate to parent expandable sections and toggle them.
This fixes that issue (@artlowel 👍)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks great now, @ybnd ! Thanks for the small updates.
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-expanded
aria-disabled
Reviewing
Run deque a11y check
The sidebar should look & act the same as on
main
Checklist
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 lint
package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.