Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-application-header-layout, terra-layout] Fix for the "Skip to content" button accessibility issue #2105

Merged
merged 5 commits into from
Mar 27, 2024

Conversation

user099
Copy link
Contributor

@user099 user099 commented Mar 27, 2024

Summary

When a user using a screen reader (Voice Over and JAWS were checked) uses “Skip to content” button there can be unexpected focus behavior where focus is not moved to the main content but stays in place where the “Skip to content” button was previously shown.

What was changed:

  • Within terra-layout, tabindex attribute with value -1 was added to the main element (data-terra-layout-main).
  • Within terra-application-header-layout, “Skip to content” button logic that adds and removes tabindex attribute for the main element was removed.

Why it was changed:
These changes were made in order to fix the unexpected focus behavior for the “Skip to content” button for users using screen readers.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

It was noticed that the changes suggested in this pull request revert changes that were made some time ago in order to fix a keyboard scroll related issue (https://github.com/cerner/terra-framework/pull/662/files). However, I’ve tested my changes and I haven’t experienced any keyboard scroll related issues.

This PR resolves:

UXPLATFORM-XXXX


Thank you for contributing to Terra.
@cerner/terra

@github-actions github-actions bot temporarily deployed to preview-pr-2105 March 27, 2024 21:29 Destroyed
@github-actions github-actions bot temporarily deployed to preview-pr-2105 March 27, 2024 21:41 Destroyed
@sdadn sdadn merged commit 0ef2aad into main Mar 27, 2024
22 checks passed
@sdadn sdadn deleted the skip-button-accessibility-fix branch March 27, 2024 22:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants