-
Notifications
You must be signed in to change notification settings - Fork 907
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
Fix Introduction modal dialog a11y. #19607
Merged
vraja-pro
merged 2 commits into
release/20.0
from
DUPP-900-introduction-modal-dialog-accessibility
Jan 17, 2023
Merged
Fix Introduction modal dialog a11y. #19607
vraja-pro
merged 2 commits into
release/20.0
from
DUPP-900-introduction-modal-dialog-accessibility
Jan 17, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TODO: even though the videos don't have audio content, they need transcripts to describe the visual information. |
Thanks for creating this PR @afercia , highly appreciated! |
YW. Last commit fixes a failing test by using |
15 tasks
CR & AC ✅ |
15 tasks
d-claassen
added a commit
that referenced
this pull request
Jan 25, 2023
d-claassen
added a commit
that referenced
this pull request
Jan 30, 2023
This change was reverted, and was later introduced again in #19652.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
changelog: non-user-facing
Needs to be included in the 'Non-userfacing' category in the changelog
Yoast: Accessibility
Yoast Feature
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.
Context
Fixes the New Settings Introduction modal dialog accessibility.
Please note it's a while I'm not contributing to Yoast SEO, I'm not sure whether there's anything to do with stories and tests.
Summary
This PR can be summarized in the following changelog entry:
forwardRef
for theModal
component to get a references of theDialog
DOM node, necessary to move keyboard focus on it.Relevant technical choices:
visibility: hidden
on the inactive slides so that their dimension is preserved and the animation still works as expected.aria-describedby
on the dialog only references one slide description at a time. Note: keepingModal.Description
is good as it automatically setsaria-describedby
. We shouldn't remove it as done in DUPP-884-improve-the-discard-all-changes-dialog-a-11-y #19489. However, we should use it only for the active slide.forwardRef
on the Modal component to allow passing a ref to the actual DOM element.Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
_yoast_settings_introduction
Specific a11y checks to be tested by inspecting the source with the browser dev tools:
aria-label="Introduction to settings"
attribute. Note: this was already fixed in DUPP-884-improve-the-discard-all-changes-dialog-a-11-y #19489aria-describedby
attribute references only one description ID at a time. When navigating to the next slide, thearia-describedby
value updates to the ID of the next slide description.alt="Play video"
attribute.aria-hidden="true"
attribute.Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
UI changes
Other environments
[shopify-seo]
, added test instructions for Shopify and attached theShopify
label to this PR.Documentation
Quality assurance
Innovation
innovation
label and noted the work hours.Fixes https://yoast.atlassian.net/browse/DUPP-900