Fix/keyboard accessible notification close buttons#7791
Open
faratabassum09-a11y wants to merge 3 commits into
Open
Fix/keyboard accessible notification close buttons#7791faratabassum09-a11y wants to merge 3 commits into
faratabassum09-a11y wants to merge 3 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7791 +/- ##
=======================================
Coverage 59.28% 59.28%
=======================================
Files 176 176
Lines 57967 57972 +5
=======================================
+ Hits 34365 34369 +4
- Misses 23602 23603 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Fixed the Jest test failure — const isVisible = el =>
el instanceof Element && getComputedStyle(el).display !== "none";All 75 toolbar tests now passing locally. ✅ |
Contributor
Author
|
Hi @abhnish and @walterbender! All 75 toolbar tests passing locally ✅ |
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.
What does this PR do?
Fixes keyboard inaccessibility of notification close buttons,
addressing issue #7180.
Problem
The close buttons on notification popups (
#printTextand#errorText)were implemented as
<img>tags withonclickhandlers:Changes Made
index.html<img class="msgCloseIcon">tags with proper<button>elementsaria-label="Close notification"andaria-label="Close error message"tabindex="0"for explicit tab order inclusionaria-hidden="true"on inner<img>to prevent double announcementpersistentNotification.innerHTML→textContent(bonus unsafe innerHTML fix)css/activities.cssbackground: none,border: none,padding: 0)filter: invert()to target innerimginstead of button:focus-visibleoutline for keyboard users:js/toolbar-ui.jsFocusCycleManager._shouldBypass()so Tabcycling is suspended when a notification is visible, allowing natural
Tab navigation to reach the close button
How to Test
http://localhost:3000WCAG Compliance
Related
Closes #7180
PR Category
3RD.PR.OF.SUGAR.LABS.VIDEO.mp4