Baseweb: Click Popover should trap focus and return focus to trigger when closed

Created on 15 Jan 2020  路  3Comments  路  Source: uber/baseweb

General Summary

Popover with triggerType of "click" should follow the recommendations for dialogs and drawers in WAI-ARIA Authoring Practices 1.1.

Codesandbox

Current Behavior

Currently when popover opens the popover does not trap focus. When closing the popover focus is reset to top of document.

Expected Behavior

Popover's Trigger should trap focus inside popover and closing the popover should return focus back to trigger.

Your Environment

| Tech | Version |
| ------- | ------- |
| Base UI | ^9.32.0 |
| React | ^16.8.6 |
| browser | chrome 79 |

enhancement help wanted

All 3 comments

thankyou @matthewharwood - any chance you could contribute this to the library?

@gergelyke
I think I should have sometime to work on it next week.

@gergelyke I'm on @matthewharwood 's team so I'll coordinate with him to get this fixed

Was this page helpful?
0 / 5 - 0 ratings