Problem/Motivation

I believe that we organized the skip to main link under the admin toolbar simply because it looked better and was easier to implement.

Unfortunately it makes it more difficult for keyboard only screen magnifier users to discover it.

It is an unusual pattern to have the first focus link be under the navigation menu visually.

Most keyboard only users would expect to see the skip links at the top of the screen (if they exist). If you are on a high magnification and need to change settings, it’s difficult to find.

Steps to reproduce

See skip to main link

Proposed resolution

Increase z-index of skip link.
Make skip link left aligned.
fix border-radius and add focus style consistent with rest of theme.

Remaining tasks

Review

User interface changes

Before

claro skip link centered and underneath nav bar

After

claro skip link in top left with white and green focus ring

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Issue fork drupal-2990766

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

mgifford created an issue. See original summary.

mgifford’s picture

Issue summary: View changes
StatusFileSize
new66.7 KB
andrewmacpherson’s picture

Thanks for filing this, I agree we should address it.

I think the centred horizontal position could be an issue too. A safer placing would be the top corner of the viewport, not just top edge. CSS position:fixed + an high z-index should be enough, no? The z-index would be arbitrary, but higher than the toolbar and header region. I presume that should vary between LTR and RTL languages.

I get the "it's visible, so it should look nice" argument. This issue is only about the position relative to the viewport. So long as it's sufficiently clear, I don't care about colours, rounded corners, or whatever. A border/outline will probably enhance the clarity a lot, to satisfy WCAG 1.4.11 Non-text content need for clear focus style.

The BBC use a design where the skip link appears near the left edge of their central main page container column, but this isn't necessarily the viewport edge, if you have a wide monitor and a wide browser window, say. Unusually, they place the skip-link below their logo visually, instead of right at the top. (Aside: Their skip link is also NOT the first control in the tabbing order. It comes after their logo link. Their cookie banner also comes before the skip-link, and has several links inside it, which rather defeats the object of the skip-link, but that's a separate problem.)

Let's look for a few more examples.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

camilledavis’s picture

Here are some options for Claro 9.5 using the theme's white-in-green focus ring:

  1. Partial focus ring with round edge:
    partial focus ring with round edge
  2. Partial focus ring with square edge:
    partial focus ring with square edge
  3. Full focus ring with round edge:
    full focus ring with round edge
  4. Full focus ring with square edge:
    full focus ring with square edge

camilledavis’s picture

And here's a MR using option 1 (partial focus ring with round edge)

camilledavis’s picture

Status: Active » Needs review
mgifford’s picture

StatusFileSize
new119.34 KB
new108.85 KB

Great to see movement here @camilledavis! Would be nice to be able to close some of these issues from the Before Times.

Can you provide before/after snapshots? You're providing a number of options.

Also looks like these are just CSS changes, there shouldn't be any semantic changes, just visual layout.

Also Andrew noted:
"I think the centred horizontal position could be an issue too. A safer placing would be the top corner of the viewport, not just top edge. CSS position:fixed + an high z-index should be enough, no?"

I has this been addressed? It is difficult to see from the screenshot. If you need help with the bidirectional code, let me know.

Daniel also mentioned the BBC (usually pretty solid to follow their lead), and this is what they have used:

BBC without skip links

BBC With Skip Links Visible

camilledavis’s picture

StatusFileSize
new26.88 KB
new21.6 KB

Here's a before/after for option 1

(The different options are just for focus ring style, in all 4 options the link is on the top left)

Before:

claro skip link before

After:

claro skip link after

camilledavis’s picture

Still need to make a right-aligned version for RTL

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs issue summary update

Seems there is a build failure in the MR.

Also could the issue summary be updated to include the proposed solution please.

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

gauravvvv’s picture

Issue summary: View changes
Status: Needs work » Needs review

Updated proposed solution

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new90 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

mgifford’s picture

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

camilledavis’s picture

Status: Needs work » Needs review

Created MR for 11.x, just for Claro though. Wondering what to do about Olivero since the skiplink design is different. Would be good to have some input from designers...

smustgrave’s picture

Status: Needs review » Needs work

Think the issue summary could use before/after screenshots of claro, and if not applicable if olivero is included.

camilledavis’s picture

Issue summary: View changes
camilledavis’s picture

Issue summary: View changes
camilledavis’s picture

Title: Location of "Skip to Main" link below admin toolbar is problematic for screen magnifier users » Location of "Skip to Main" link below admin toolbar in Claro is problematic for screen magnifier users
camilledavis’s picture

Separated Olivero issue into its own issue.

smustgrave’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs issue summary update
StatusFileSize
new107.18 KB

Updated issue summary to use template.

Out of curiosity tried with new navigation module

nav

Change looks good to me.

nod_’s picture

Status: Reviewed & tested by the community » Needs work

This fixes it in claro, need to fix umami, it does the same center positioning think as before. Olivero is fine (design is different but it's top-left aligned already)

gauravvvv’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Lets also include screenshots of umami since the change doesn't appear to be 1 to 1

No RTL needed for Umami?

gauravvvv’s picture

Status: Needs work » Needs review
StatusFileSize
new145.31 KB

I have attached after patch screenshot for LTR & RTL.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Believe this is fine.

  • nod_ committed 12b546ca on 10.3.x
    Issue #2990766 by camilledavis, Gauravvvv, mgifford: Location of "Skip...

  • nod_ committed c1f77264 on 10.4.x
    Issue #2990766 by camilledavis, Gauravvvv, mgifford: Location of "Skip...

  • nod_ committed 0b36d01a on 11.0.x
    Issue #2990766 by camilledavis, Gauravvvv, mgifford: Location of "Skip...

  • nod_ committed 5e0d1efa on 11.x
    Issue #2990766 by camilledavis, Gauravvvv, mgifford: Location of "Skip...

nod_’s picture

Version: 11.x-dev » 10.3.x-dev
Component: toolbar.module » CSS
Status: Reviewed & tested by the community » Fixed

Fixed css lint error on commit

Committed and pushed 5e0d1efa0a to 11.x and 0b36d01ad6 to 11.0.x and c1f7726488 to 10.4.x and 12b546ca74 to 10.3.x. Thanks!

Status: Fixed » Closed (fixed)

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