Demos
Focus must be manually managed when the NotificationDrawer component is opened:
- Create a React
ref
and pass it into the NotificationDrawer component'sref
attribute - Pass in a function to the
onNotificationDrawerExpand
prop of the Page component that will place focus on the first interact-able element inside the NotificationDrawer component via the previously createdref
- Create a React
Grouped
When using the NotificationDrawerGroupList and related components, the function that is passed in to the onNotificationDrawerExpand
prop on the Page component must also ensure the NotificationDrawer component only receives focus when it is initially opened. Otherwise any time a drawer group item is opened the NotificationDrawer component will receive focus, which would be unexpected behavior for users.