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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
terra-layout
,tabindex
attribute with value-1
was added to the main element (data-terra-layout-main
).terra-application-header-layout
, “Skip to content” button logic that adds and removestabindex
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:
Reviews
In addition to engineering reviews, this PR needs:
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