Skip to content

Allow the role of the <li> element in ActionList.LinkItem to be modified #6255

@muskan-k

Description

@muskan-k

Description

According to the role guidelines documented here, if we use the role of menu, the child link items have the role of ListItem and are unable to be changed causing accessibility violations.

The role prop is passed on to <a> instead of the parent LinkItem.

It would be nice to be able to expose a new prop to change that value.

Steps to reproduce

  1. Create a ActionList with role="menu"
  2. Fill it with LinkItem
  3. Attempt to override the role of LinkItem to be menuitem
  4. Role is not overwritten and causes a11y violations.

Version

v37.27.0

Browser

Chrome

cc: @ctmayn

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions