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

Accessibility: No alt text on any icons #5905

Merged
merged 10 commits into from
Sep 5, 2019
Merged

Accessibility: No alt text on any icons #5905

merged 10 commits into from
Sep 5, 2019

Conversation

BatJan
Copy link
Contributor

@BatJan BatJan commented Jul 16, 2019

Prerequisites

  • I have added steps to test this contribution in the description below

This fixes issue 29, 108 and 122 from #5277

Description

This PR fixes some accessibility issues with the button's in the top right corner of the users section "Users" and "Groups".

The <a> tag has been converted to a <button> and the tabindex="-1" has been removed, so it's possible to reach the options using the tab key. Furthermore the icon has been hidden from screen readers using the aria-hidden attribute.

Also I've adjusted the styling to cater for the button now being used and so that it's possible to visually see that one has tabbed to one of the options.

This is a general change in the <umb-editor-navigation-item> directive/component so it will also improve the accessibility wherever this is used like in the content section (content apps) and package section for instance 😃

Edit 17/07/2019: Turns out issue 29 from the accessibility issue is somewhat related to this issue as well so I have fixed the issue mentioned in this issue as well.

This means the dropdown has got the following updates

  • The href attribute on the tag has been updated to reference the group that it makes you jump to for semantic reasons since it's really an anchor, which means the "umb-tabbed-content" file has been modified too in order to have an id attribute that matches the anchor
  • Furthermore the styling has been changed so the groups can be tabbed through like illustrated in the gif's below using the :focus-within selector
  • I propose creating a new area in the language files called "visuallyHiddenTexts" as I foresee we're going to be needing many of those texts and if we don't put them in the same group of texts it can become hard to figure out where and why they're being used - Should also make it easier to keep track of for people wanting to translate the keys. So I have done that adding english and danish keys meaning screen readers will get "Jump to Content group" read out but visually one will only see "Content" in the dropdown

Looking forward to receive some feedback one this 👍

Tabbing before
umb-editor-navigation-item-before

Tabbing after
umb-editor-navigation-item-after

Tabbing where a tab has a dropdown before
umb-editor-navigation-item-withdropdown-before

Tabbing where a tab has a dropdown after
umb-editor-navigation-item-withdropdown-after

… it's possible to hit it with when navigation using a keyboard. Also hiding the icon from screen readers and adding a new class called "__action" and make sure all styles match it so you can't visually tell the difference from before.
BatJan added 7 commits July 16, 2019 10:02
…his component further - Stuff for another PR really :)
…f "group" + group.id to ensure we can add a proper anchor reference to the area using the dropdown in the umb-editor-navigation-item directive
…readers - We don't want that :-) Also adding the :focus-within pseudo selector so any children that might be present will appear when tabbing through the UI
…ingful non-visual context for screen readers
…upported with the upcoming release of Edge 76
@BatJan BatJan changed the title No alt text on any icons (Issue 122 from the accessibility list) Accessibility: No alt text on any icons Jul 21, 2019
@emmaburstow
Copy link
Contributor

Wonderful work here, Jan. Thanks ever so much. We'll get in touch if we need you at all.

Em

# Conflicts:
#	src/Umbraco.Web.UI/Umbraco/config/lang/da.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en.xml
#	src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml
@nul800sebastiaan nul800sebastiaan merged commit 5def93f into umbraco:v8/dev Sep 5, 2019
@nul800sebastiaan
Copy link
Member

Love it! Corrected the visuallyhidden class to sr-only! :-)

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.

3 participants