-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: focus utils #1556
base: master
Are you sure you want to change the base?
feat: focus utils #1556
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1556 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 96 100 +4
Lines 1703 1737 +34
Branches 477 501 +24
=========================================
+ Hits 1703 1737 +34
... and 13 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Kudos, SonarCloud Quality Gate passed!
|
f226c62
to
ac9795b
Compare
d9f1703
to
b4ad404
Compare
7cb2910
to
ee1064a
Compare
Kudos, SonarCloud Quality Gate passed!
|
Description
NB This is part 1 of an effort to refactor popover and add a new dropdown menu component.
Add some focus utils, namely a tree walker that allows us to get all focussable/tabbable nodes within an element
Add
DismissableFocusTrap
component. As this is intended for use with portaled UI elements like modals, menus and popovers, it combines focus trapping and escape/click outside dismiss behaviour. This could be separated into 2 components (FocusTrap / Dismissable) if preferred.Implement the focus trap in the
ActionPanel
componentReference: https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/
Does this PR introduce a breaking change?
Manual testing step?
Screenshots (if appropriate):