fix(overlay): additional content not dismissible#5893
Conversation
🦋 Changeset detectedLatest commit: 4969dce The changes in this PR will be included in the next version bump. This PR includes changesets to release 80 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📚 Branch Preview🔍 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an accessibility compliance issue (WCAG 2.2 Success Criterion 1.4.13) by enabling hover-triggered overlays (tooltips/hints) to be dismissed with the Escape key, even when the trigger element doesn't have focus.
- Added escape key handling for 'hint' type overlays in OverlayStack
- Includes comprehensive test coverage for the new functionality
- Properly prevents event propagation to avoid unintended side effects
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| 1st-gen/packages/overlay/src/OverlayStack.ts | Adds escape key handling for 'hint' type overlays with proper event prevention |
| 1st-gen/packages/overlay/test/overlay-trigger-hover.test.ts | Adds test for escape key dismissal and fixes existing test to dispatch event on tooltip |
| 1st-gen/packages/overlay/test/index.ts | Adds integration test for escape key closing hover popovers |
| 2nd-gen/packages/core/shared/base/version.ts | Adds Apache License copyright header to generated file |
| .changeset/funny-eggs-sell.md | Documents the patch-level changes for overlay and core packages |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix SWC-1047: hover overlays should close with the Esc key when trigger is not focus.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
9cea3a7 to
4969dce
Compare
📚 Branch Preview Links🔍 First Generation Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
| @@ -0,0 +1,6 @@ | |||
| --- | |||
| '@spectrum-web-components/overlay': patch | |||
| '@spectrum-web-components/core': patch | |||
There was a problem hiding this comment.
core doesnt need to be included in this changeset since the only thing added was a copyright
caseyisonit
left a comment
There was a problem hiding this comment.
one minor nit but otherwise good work
cdransf
left a comment
There was a problem hiding this comment.
This looks great, thank you! ✨
Description
Fix for SWC-1047: hover overlays should close with the Esc key when trigger is not focus.
Motivation and context
Fixes accessibility compliance failure of Success Criterion 1.4.13 Content on Hover or Focus (Level AA), because tooltips that display on hover cannot be dismissed using the Escape key.
Related issue(s)
Screenshots (if appropriate)
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
_Overlay: Deep Child Tooltip _
Overlay: Hover With Interactive Content
Device review