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

Command icon 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

michaelablackham created an issue. See original summary.

jldust made their first commit to this issue’s fork.

jldust’s picture

Status: Active » Needs review
pixelwhip’s picture

This change makes a lot of sense to me! Merge request looks good.

philip_stier’s picture

There are several – more philosophical – questions that I have mostly for an accessibility expert, but otherwise, this change looks great! Ready to merge :)

  • jldust committed 8ed57537 on 5.x
    Issue #3466036 by jldust, michaelablackham, pixelwhip, philip_stier:...
jldust’s picture

Status: Needs review » Fixed

Thanks for the review, this has been merged in and will be included in the next tagged release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.