Problem/Motivation
“Skip to main content” can only skip repeated content (like the header on every page). It should not skip unique content. For example, we currently have it setup so if a user interacts with "skip to main content" it brings them past the page title, past any breadcrumbs, past any links in the hero, and goes straight to the <main>. This is an issue for many sites where we have links in the hero.
This has been noted in other projects, but has been a blocker for Lem's A11y launch.
Proposed resolution
Move <a id='main-content' tabindex='-1'></a> to right below the <header> as a default.
This way, the focus will always be brought to whatever is right after the header whether that is in the main or banner or what. This is a very common occurrence with our designs and our implementation.
Open to other placement if there is a better solution
Issue fork prototype-3466036
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
jldust commentedComment #5
pixelwhip commentedThis change makes a lot of sense to me! Merge request looks good.
Comment #6
philip_stier commentedThere are several – more philosophical – questions that I have mostly for an accessibility expert, but otherwise, this change looks great! Ready to merge :)
Comment #8
jldust commentedThanks for the review, this has been merged in and will be included in the next tagged release.