You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a DropdownItem has the property disabled={true} it is not rendered including the menuitem role. When writing tests you have to target a different role to find the element getByRole('menuitem) vs getByRole('button').
What should be happening?
The menuitem role should not depend on the disabled status of the component.
Adding to this, it is not only a problem in tests. From an accessibility point of view, it also becomes an invalid role inside a role="menu" container, which does not allow role="button" children.
DropdownItem
^8.9.0
es
^17
^4.6
What is happening?
When a
DropdownItem
has the propertydisabled={true}
it is not rendered including themenuitem
role. When writing tests you have to target a different role to find the elementgetByRole('menuitem) vs getByRole('button')
.What should be happening?
The
menuitem
role should not depend on the disabled status of the component.Steps to reproduce issue
You can check the issue in the Reacstrap site
https://reactstrap.github.io/?path=/docs/components-dropdown--dropdown#uncontrolled
The text was updated successfully, but these errors were encountered: