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

Fix secondary menu item accessibility #5701

Merged
merged 3 commits into from
Jun 25, 2019
Merged

Fix secondary menu item accessibility #5701

merged 3 commits into from
Jun 25, 2019

Conversation

tiffy74
Copy link
Contributor

@tiffy74 tiffy74 commented Jun 20, 2019

Prerequisites

If there's an existing issue for this PR then this fixes Issue 5277 - no.95 and no.100

Description

Added role=tablist to ul of dashboard menu and added role=tab to li items of dashboard menu. This means they will now not be skipped by navigation

Copy link
Contributor

@emmaburstow emmaburstow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes yes yes. Thanks for the work @tiffy74 :)

<ul class="umb-tabs-nav">
<li class="umb-tab" ng-repeat="tab in vm.tabs | limitTo: vm.maxTabs" data-element="tab-{{tab.alias}}" ng-class="{'umb-tab--active': tab.active, 'umb-tab--error': tabHasError}" val-tab>
<ul role="tablist" class="umb-tabs-nav">
<li class="umb-tab" role="tab" aria-selected="true" aria-controls="panel-1" id="tab-1" tabindex="0" ng-repeat="tab in vm.tabs | limitTo: vm.maxTabs" data-element="tab-{{tab.alias}}" ng-class="{'umb-tab--active': tab.active, 'umb-tab--error': tabHasError}" val-tab>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tiffy74 it seems to be invalid, where all tabs get the id tab-1. You could change it to id="tab-{{$index + 1}}" and maybe tabindex="{{$index}}".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the response

Actually I had intended it to be simpler - I just forgot to remove the additional elements from my own testing code. The id="tab-1" was meant to be removed.

It should be:

<li class="umb-tab" role="tab" aria-selected="true" tabindex="0" ng-repeat="tab in vm.tabs | limitTo: vm.maxTabs" data-element="tab-{{tab.alias}}" ng-class="{'umb-tab--active': tab.active, 'umb-tab--error': tabHasError}" val-tab> <a ng-href="" ng-click="vm.clickTab($event, tab)">{{ tab.label }}</a> </li>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have now updated the branch and removed the id and aria-controls elements - tested and works as expected.

Removed id and aria-controls - tested and secondary menu tabbing functions correctly
@nul800sebastiaan
Copy link
Member

Hi @tiffy74 - before I review this, the title of this PR is a bit ambiguous as to whether the work on this PR has completed or not?

I see there's a merge conflict but that's fine, something I can resolve easily when reviewing 👍

So let me know if you're still working on this PR or if it's ready for review.

@tiffy74
Copy link
Contributor Author

tiffy74 commented Jun 25, 2019

Hiya @nul800sebastiaan

It is ready for review. Think the merge conflict is the package-lock file so as you say can be resolved easily.

Ive removed the items that @bjarnef was highlighting and so should work fine now

Thanks

Tiff

@nul800sebastiaan nul800sebastiaan merged commit 8d67e39 into umbraco:v8/dev Jun 25, 2019
@nul800sebastiaan
Copy link
Member

Thanks @tiffy74 ! I've reverted the package-lock and am happy with the proposed change. Thanks very much! 🎖

@nul800sebastiaan nul800sebastiaan changed the title secondary menu tab first commit Fix secondary menu item accessibility Jun 25, 2019
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.

V8: Fix A & AA accessibility issues throughout the back-office
4 participants