Skip to content
Permalink
Browse files

feat(dropdown): add `role=presentation` to `<li>` elements for improv…

…ed a11y (#3996)

* chore(dropdown): add `role=presentation` to `<li>` elements

* Update dropdown-form.js

* Update dropdown-group.js

* Update dropdown-header.js

* Update dropdown-item-button.js

* Update dropdown-item.js

* Update dropdown-text.js
  • Loading branch information...
tmorehouse authored and jackmu95 committed Sep 1, 2019
1 parent 484f012 commit 464d257f709c856ab04ff237a178b83e1776e9b6
@@ -15,7 +15,7 @@ export const BDropdownDivider = /*#__PURE__*/ Vue.extend({
inheritAttrs: false,
props,
render(h, { props, data }) {
return h('li', [
return h('li', { attrs: { role: 'presentation' } }, [
h(
props.tag,
mergeData(data, {
@@ -14,7 +14,7 @@ export const BDropdownForm = /*#__PURE__*/ Vue.extend({
}
},
render(h, { props, data, children }) {
return h('li', [
return h('li', { attrs: { role: 'presentation' } }, [
h(
BForm,
mergeData(data, {
@@ -62,14 +62,15 @@ export const BDropdownGroup = /*#__PURE__*/ Vue.extend({
.join(' ')
.trim()

return h('li', [
return h('li', { attrs: { role: 'presentation' } }, [
header || h(),
h(
'ul',
mergeData(data, {
staticClass: 'list-unstyled',
attrs: {
id: props.id || null,
role: 'group',
'aria-describedby': adb || null
}
}),
@@ -23,7 +23,7 @@ export const BDropdownHeader = /*#__PURE__*/ Vue.extend({
inheritAttrs: false,
props,
render(h, { props, data, children }) {
return h('li', [
return h('li', { attrs: { role: 'presentation' } }, [
h(
props.tag,
mergeData(data, {
@@ -43,7 +43,7 @@ export const BDropdownItemButton = /*#__PURE__*/ Vue.extend({
}
},
render(h) {
return h('li', [
return h('li', { attrs: { role: 'presentation' } }, [
h(
'button',
{
@@ -37,7 +37,7 @@ export const BDropdownItem = /*#__PURE__*/ Vue.extend({
}
},
render(h) {
return h('li', [
return h('li', { attrs: { role: 'presentation' } }, [
h(
BLink,
{
@@ -17,7 +17,7 @@ export const BDropdownText = /*#__PURE__*/ Vue.extend({
}
},
render(h, { props, data, children }) {
return h('li', [
return h('li', { attrs: { role: 'presentation' } }, [
h(
props.tag,
mergeData(data, {

0 comments on commit 464d257

Please sign in to comment.
You can’t perform that action at this time.