Popover - When clicked outside of a focus trap, focus is not returned to the element prior to the focus trap #10682
Labels
0 - new
New issues that need assignment.
a11y
Issues related to Accessibility fixes or improvements.
ArcGIS Maps SDK for JavaScript
Issues logged by ArcGIS SDK for JavaScript team members.
bug
Bug reports for broken functionality. Issues should include a reproduction of the bug.
calcite-components
Issues specific to the @esri/calcite-components package.
impact - p3 - not time sensitive
User set priority impact status of p3 - not time sensitive
needs triage
Planning workflow - pending design/dev review.
p - high
Issue should be addressed in the current milestone, impacts component or core functionality
Check existing issues
Summary
When the
esc
key is pressed when the calcite popover is open, it will always close the popover, even if the focus is elsewhere in the web page.When clicked outside of the focus trap (like on the map for example), we would expect the
esc
key to no longer affect the popover, at least until the focus is returned to that element.Ideal behavior:
Currently, in both of the scenarios above, focus is returned to the element prior to the focus trap. It seems like we may want different things depending on if the focus trap is deactivated due to a click vs escape key press.
Actual Behavior
The
esc
key will always close the popover, even if the focus is no longer on the popover.The focus will always return to the element prior to the focus trap, even if it is deactivated due to a click elsewhere.
Expected Behavior
When clicked outside of a focus trap, the focus should not be returned to the element prior to the focus trap.
Reproduction Sample
https://codepen.io/driskull/pen/zYgaNQP
Reproduction Steps
Reproduction Version
2.13.2
Working W3C Example/Tutorial
No response
Relevant Info
related JS SDK issue: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/66350#issuecomment-5110811
Regression?
No response
Priority impact
impact - p3 - not time sensitive
Calcite package
Esri team
ArcGIS Maps SDK for JavaScript
The text was updated successfully, but these errors were encountered: