Skip to content

Add labels for Contacts menu and Settings, thanks to @MarcoZehe - #9224

Merged
MorrisJobke merged 5 commits into
masterfrom
accessibility-improvements
Apr 19, 2018
Merged

Add labels for Contacts menu and Settings, thanks to @MarcoZehe#9224
MorrisJobke merged 5 commits into
masterfrom
accessibility-improvements

Conversation

@jancborchardt

@jancborchardtjancborchardt commented Apr 18, 2018

Copy link
Copy Markdown
Member

Ideally, the labels should show up as popovers also when hovering just like for the apps cc @juliushaertl@skjnldsv.

Please review @nextcloud/accessibility @nextcloud/designers @MarcoZehe

@jancborchardtjancborchardt added bug design Design, UI, UX, etc. 3. to review Waiting for reviews labels Apr 18, 2018
@jancborchardtjancborchardt self-assigned this Apr 18, 2018
Comment threadcore/templates/layout.user.php Outdated
</div>
<div id="settings">
<nav id="settings" aria-label="Settings">
<div id="expand" tabindex="0" role="link" class="menutoggle">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This would create a navigation landmark with the label "Settings", but the actual link (which should be a button) will still not be labeled. Also, due to the tabindex attribute, keyboard focus will land on here. So what the user will hear is:

"Settings navigation landmark"

followed by "Link".

And that link still won't say that it is the Settings link, that it's actually hiding a dropdown menu (aria-haspopup="true", and that it's currently hiding it (aria-expanded="false"). Oh and yes that div should have a role of "button", not "link". Links go somewhere, buttons do something.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Just added the aria-haspopup, -expanded and -controls attributes. Will look into the other things now, thank you!

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I moved the aria-label="Settings" down to the actual link, and also added an aria-label="Settings menu" to the menu. Is that correct?

Comment threadcore/templates/layout.user.php Outdated
<div class="menu"></div>
</div>
<div id="settings">
<nav id="settings" aria-label="Settings">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't this be localized as well?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yes, aria-label, or anything referenced by aria-labeledby via ID, as well as aria-describedby (for additional info, less often used), are spoken by a screen reader and thus should be localized.

@codecov

codecovBot commented Apr 18, 2018

Copy link
Copy Markdown

Codecov Report

Merging #9224 into master will decrease coverage by <.01%.
The diff coverage is 10%.

@@ Coverage Diff @@## master #9224 +/- ##
============================================
- Coverage 51.91% 51.91% -0.01% 
Complexity 25361 25361 ============================================
Files 1606 1606 Lines 95311 95317 +6 Branches 1394 1394 ============================================
+ Hits 49478 49480 +2 - Misses 45833 45837 +4
Impacted FilesCoverage ΔComplexity Δ
core/templates/login.php0% <ø> (ø)0 <0> (ø)⬇️
core/templates/layout.public.php0% <0%> (ø)0 <0> (ø)⬇️
core/templates/layout.user.php0% <0%> (ø)0 <0> (ø)⬇️
core/templates/layout.guest.php0% <0%> (ø)0 <0> (ø)⬇️
core/templates/layout.base.php0% <0%> (ø)0 <0> (ø)⬇️
core/js/js.js65.96% <100%> (+0.07%)0 <0> (ø)⬇️
apps/files_trashbin/lib/Trashbin.php72.46% <0%> (-0.25%)136% <0%> (ø)
lib/private/Files/Cache/Propagator.php96.2% <0%> (+1.26%)16% <0%> (ø)⬇️

@jancborchardt

Copy link
Copy Markdown
MemberAuthor

Also added labels to the apps now. @MarcoZehe I did it via aria-label on the link directly, since it’s simpler than aria-labelledby referring to the span.

@jancborchardt

Copy link
Copy Markdown
MemberAuthor

@MarcoZehe I think now all the feedback points you mentioned on Twitter should be fixed? (Except making the elements buttons, because that will need some more global CSS work.)

@nextcloud/accessibility please check also. :)

Comment threadcore/templates/layout.user.php Outdated
</ul>

</div>
</nav>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Indentation seems wrong here.

… thanks to @MarcoZehe
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
@jancborchardt
jancborchardtforce-pushed the accessibility-improvements branch from f704b5f to df3c1acCompareApril 18, 2018 13:09
@jancborchardt

Copy link
Copy Markdown
MemberAuthor

Squashed the commits into one also because it’s not so much, and in case we want to backport. @MorrisJobke?

Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
@jancborchardt

Copy link
Copy Markdown
MemberAuthor

I also went through it with aXe again and fixed some more color contrast and issues on the log in page. This should be good to go now, and other aspects like settings and such we should do in separate pull requests.

@MorrisJobke

Copy link
Copy Markdown
Member

Retriggered the CI job

@jancborchardt

Copy link
Copy Markdown
MemberAuthor

@MarcoZehe by the way, I’d like to invite you to the Nextcloud organization here, and the accessibility team as well. Let me know if you are ok with that. :)

@MorrisJobkeMorrisJobke added this to the Nextcloud 14 milestone Apr 19, 2018
@MorrisJobke
MorrisJobke merged commit 0bae516 into masterApr 19, 2018
@MorrisJobke
MorrisJobke deleted the accessibility-improvements branch April 19, 2018 12:47
@MorrisJobke

Copy link
Copy Markdown
Member

We should backport this to stable13 for 13.0.3

@tyrylu

Copy link
Copy Markdown
Contributor

Yes, please, i would be glad as well.

@MorrisJobke

Copy link
Copy Markdown
Member

We should backport this to stable13 for 13.0.3

@jancborchardt Could you do this? Thanks

@jancborchardt

Copy link
Copy Markdown
MemberAuthor

@MorrisJobke I have issues with my laptop currently as it is not properly charging, and is off to repair since yesterday eve. :/ Could I ask you to do it?

@MorrisJobke

Copy link
Copy Markdown
Member

@MorrisJobke I have issues with my laptop currently as it is not properly charging, and is off to repair since yesterday eve. :/ Could I ask you to do it?

Sure - there you go #9433

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugdesignDesign, UI, UX, etc.feature: accessibility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@jancborchardt@MorrisJobke@tyrylu@MarcoZehe@juliusknorr@skjnldsv