Skip to content

No skip to content link #11602

Closed
Closed

Description

@jmankoff

A best practice for accessibility is to have a skip to content link at the beginning of every web page that is invisible and skips to content, something like this:

<a class="skip-main" href="#quarto-document-content">Skip to main content</a>

It's typically styled something like this:

a.skip-main {
    left:-999px;
    position:absolute;
    top:auto;
    width:1px;
    height:1px;
    overflow:hidden;
    z-index:-999;
}
a.skip-main:focus, a.skip-main:active {
    left: auto;
    top: auto;
    width: 30%;
    height: auto;
    overflow:auto;
    margin: 10px 35%;
    padding:5px;
    text-align:center;
    font-size:1.2em;
    z-index:999;
}

I've found a work around using
announcement:
content: Skip to main content
position: above-navbar
dismissable: false

However (1) this creates a non-zero height announcement area above the navbar and (2) this precludes announcements being used for anything else. Quarto should have the skip-to-content link by default built into all websites to improve their WCAG compliance.

Activity

  1. transferred this issue fromquarto-dev/quartoon Dec 2, 2024
  2. locked and limited conversation to collaborators on Dec 2, 2024
  3. converted this issue into a discussion #11603 on Dec 2, 2024
  4. added
    support
    on Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    support

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions