fix(a11y): DOTCOM-180525 - error toast Close button not keyboard accessible#111
Open
dstrong23 wants to merge 1 commit into
Open
fix(a11y): DOTCOM-180525 - error toast Close button not keyboard accessible#111dstrong23 wants to merge 1 commit into
dstrong23 wants to merge 1 commit into
Conversation
…essible - Change errorCloseBtn from div[role=button] to native <button> so keyboard users can Tab to it and activate with Enter/Space without a custom keydown handler - Update widget click guard from deprecated e.srcElement to e.target.closest() with a precise selector, preventing the guard from swallowing clicks on the close button SVG child (which had 'close-icon error' classes matching the old check) Fixes WCAG 2.1.1 Keyboard (Level A) - DOTCOM-180525
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
Collaborator
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fixes WCAG 2.1.1 Keyboard (Level A) violation on the error toast in all verb-widget pages, including the AI Summary Generator.
Jira: https://jira.corp.adobe.com/browse/DOTCOM-180525
Changes
acrobat/blocks/verb-widget/verb-widget.js1.
errorCloseBtn—div→ nativebuttonNative
<button>elements are focusable and keyboard-activatable (Enter/Space) without requiring a customkeydownhandler.2. Widget click guard —
e.srcElement→e.target.closest()e.srcElementis deprecated. The old string check also matchedclose-icon errorclasses on the SVG inside the close button, swallowing clicks before they reached the close handler.Testing
Supersedes PR #110 (branch renamed from
fix/DOTCOM-180525-v2)