Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds "skip to main content" link to all pages that inherit from base templates #6237

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

cfm
Copy link
Member

@cfm cfm commented Jan 26, 2022

Status

Ready for review

Description of Changes

Towards #5972, adds a "skip to main content link" to all pages that inherit from base templates.

Testing

  1. Log into the Source Interface.
  2. Observe that there is no "Skip to main content link" visible.
  3. Tab through the page, with or without a screen-reader running.
  4. Observe that the "Skip to main content link" appears when it receives focus.
  5. Click the link and continue tabbing through the main content.
  6. Repeat steps (1)–(5) on the Journalist Interface.

Deployment

No deployment considerations.

Checklist

If you made changes to the server application code:

  • Linting (make lint) and tests (make test) pass in the development container

@cfm cfm added the a11y Issues related to accessibility label Jan 28, 2022
…templates

In accordance with <https://webaim.org/techniques/skipnav/>, the links
are visually hidden until they receive focus, to benefit users
navigating by keyboard whether or not they are using a screen-reader.

The Source Interface's link is looser than that on the Journalist
Interface: it jumps to a MAIN element that includes some navigational
content, and it doesn't appear at all on the landing page.  However, the
point of a skip link is to skip sections *repeated* across a Web
site, and the Source Interface is small enough, and sources'
interactions with it purposeful enough, that I believe this
implementation meets the spirit of WCAG 2.4.1 for SecureDrop's purposes.
@cfm cfm marked this pull request as ready for review January 28, 2022 23:58
@cfm cfm requested a review from a team as a code owner January 28, 2022 23:58
@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2022

Codecov Report

Merging #6237 (814c965) into develop (5daebb6) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6237   +/-   ##
========================================
  Coverage    85.12%   85.12%           
========================================
  Files           59       59           
  Lines         4088     4088           
  Branches       487      487           
========================================
  Hits          3480     3480           
  Misses         491      491           
  Partials       117      117           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5daebb6...814c965. Read the comment docs.

@legoktm legoktm self-assigned this Feb 25, 2022
Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

LGTM, verified the test plan on both SI and JI by tabbing through it (not a screen-reader).

@legoktm legoktm merged commit a5f7e39 into develop Feb 25, 2022
@legoktm legoktm deleted the 5972-skip-link branch March 16, 2022 16:47
@zenmonkeykstop zenmonkeykstop mentioned this pull request Mar 17, 2022
34 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Issues related to accessibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants