Drawer
Accessibility
We have built in functionality based on the recommendations for dialogs and drawers in WAI-ARIA Authoring Practices 1.1.
- Upon opening, focus will be transferred to the first interactive element (unless
autofocusis set to false) - Container element has
aria-label="drawer" Escapekey closes the drawer- Click on backdrop (anywhere outside dialog) hides drawer.
- Background is not be scrollable while drawer is open (position: fixed).
- Upon closing, focus should return to element that triggered drawer.
Drawer API
Warning any = "Prop types are not shown in dev mode"
extract-react-types is not being run in dev mode for speed reasons. If you need to
see prop types add the environment variable FORCE_EXTRACT_REACT_TYPES
eg:
FORCE_EXTRACT_REACT_TYPES=true yarn start <packageName>FORCE_EXTRACT_REACT_TYPES=true yarn start:<team>