Unplanned
Last Updated: 13 Mar 2023 12:43 by Pete
Pete
Created on: 13 Mar 2023 12:43
Category: Drawer
Type: Feature Request
1
Add option to define a role attribute for the k-drawer element inside the Drawer component

In a scenario where we want to use the Drawer as a navigational component, the best solution from an accessibility perspective would be to add role="navigation" to the Drawer's items and role="main" to the Drawer's content.

The current implementation of the Drawer provides the option to define the discussed role for its content using the following code:

<DrawerContent role="main">
  <router-view />
</DrawerContent>

In the current implementation of the Drawer, the only way we can define a role for its items is through a Javascript code like the following one.

document
  .querySelector('.k-widget.k-drawer')
  .setAttribute('role', 'navigation');

Providing a way to configure the role of the Drawer's items will be a useful feature for the component.

 

 

0 comments