🌐 AI搜索 & 代理 主页
Skip to content

Commit 9e25a3b

Browse files
authored
fix(b-table): prefer user-provided role attribute (#6382)
1 parent 7765d7c commit 9e25a3b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/table/helpers/mixin-selectable.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,15 @@ export const selectableMixin = Vue.extend({
7070
}
7171
},
7272
selectableTableAttrs() {
73+
const role = this.bvAttrs.role || 'grid'
74+
7375
return this.isSelectable
7476
? {
75-
role: 'grid',
77+
role,
7678
// TODO:
7779
// Should this attribute not be included when `no-select-on-click` is set
7880
// since this attribute implies keyboard navigation?
79-
'aria-multiselectable': String(this.selectableIsMultiSelect)
81+
'aria-multiselectable': role === 'grid' ? String(this.selectableIsMultiSelect) : null
8082
}
8183
: {}
8284
}

0 commit comments

Comments
 (0)