Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Conversation

@cjstevens78
Copy link
Collaborator

@cjstevens78 cjstevens78 commented Jan 28, 2021

During a recent accessibility review on Croydon via the AXE auditor - it was flagged that the 'Skip to Main' link should be contained within a landmark.

I have wrapped the link in a <nav> landmark and denoted its function with an 'aria-label'.

I've checked this from a visual and functional pov and all is well.

@cjstevens78
Copy link
Collaborator Author

@danchamp another accessibility fix awaiting review - if you could cast your eye over it for me thanks chris

Copy link
Collaborator

@paulpopus paulpopus left a comment

Choose a reason for hiding this comment

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

Correct me if I'm wrong but I think if you omit the aria-label on the <nav> element, the contents will be ready? I don't think that is a bad thing in this particular case.

Either way it looks good to me!

@cjstevens78
Copy link
Collaborator Author

cjstevens78 commented Feb 9, 2021

Correct me if I'm wrong but I think if you omit the aria-label on the <nav> element, the contents will be ready? I don't think that is a bad thing in this particular case.

Either way it looks good to me!

@paulpopus yes i looked into this - normally you omit the label on a nav if it is the main navigation - but supplementary nav's need to be labelled - thanks!

@cjstevens78 cjstevens78 merged commit fdcdc67 into master Feb 9, 2021
@cjstevens78 cjstevens78 deleted the feature/146-skip-main branch February 9, 2021 13:49
@danchamp
Copy link
Collaborator

danchamp commented Feb 9, 2021

Sorry, late to review this. I think <nav> might be a case of 'too much accessibility'. The main beneficiaries of skip links are sighted keyboard users, and this change has no benefit to them. Users who rely on landmarks and use assistive tech with landmark support will already know where the main landmark is, and have the ability to navigate to it without the skip link.

The most disadvantaged by the <nav> will be screen-reader users who don't use landmarks, who will have the nav element label read to them (something like "Skip to Main Content navigation"), and then repeated in "Link: skip to main content".

I'd be more inclined to omit the wrapper element and move the <a> to be the first child of the <header> in header.html.twig. From a quick test this should work without any other changes required.

@cjstevens78 cjstevens78 restored the feature/146-skip-main branch February 9, 2021 14:18
@cjstevens78
Copy link
Collaborator Author

@danchamp ok - good point thanks Dan - ill incorporate this in now and raise a new PR when ready

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants