-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
accessibility issue with b-dropdown-item-button and v-b-modal.id-of-modal #4149
accessibility issue with b-dropdown-item-button and v-b-modal.id-of-modal #4149
Comments
@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 |
We may want to add in an example of this in the docs (and the reasoning why) |
PR #4187 will address the original issue, and check to see if the directive is applied to a dropdown item or nav item, and if so, will apply itself to the inner link or button instead of the wrapper |
BootstrapVue v2.0.3 has been released, which will correctly handle this scenario automagically |
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
Expected behavior
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?
Versions
Libraries:
Environment:
Demo link
https://codepen.io/geertsrj/pen/eYOxJGN
Additional context
no additional context
The text was updated successfully, but these errors were encountered: