Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
accessibility issue with b-dropdown-item-button and v-b-modal.id-of-modal #4149
Describe the bug
When I try to trigger a modal to open from a drop down button. The role of the associated li element is changed to "button."
Steps to reproduce the bug
I am using an accessibility testing utility called axe to test for accessibility violations and it is saying that this is not allowed. Presumably because the child of a ul should be an li. The normal dropdown-item-button role is "presentation". Axe does not complain about this, but I would seem to think the li would not need a role at all? Or the role would be "listitem"?? The "presentation" role is a bit of a mystery to me yet admittedly so can't say this makes a lot of sense either?
no additional context
@rgeerts The directive gets placed onto the root element of what ever you place it on. In this case menu items are wrapped in
Your best bet would be to use a
<b-dropdown-item-button @click="$bvModal.show('modal-1')"> First item </b-dropdown-item-button>
See this fiddle: https://codepen.io/tmorehouse/pen/MWgLyKj