Skip to content

Commit bc02fb8

Browse files
authored
fix(b-table): add missing role="grid" when selectable (closes bootstrap-vue#6305) (bootstrap-vue#6372)
* fix(b-table): add missing `role="grid"` when selecatble * Update table-selectable.spec.js * Update table-selectable.spec.js
1 parent 0a14828 commit bc02fb8

File tree

2 files changed

+134
-47
lines changed

2 files changed

+134
-47
lines changed

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,15 @@ export const selectableMixin = Vue.extend({
7070
}
7171
},
7272
selectableTableAttrs() {
73-
return {
74-
// TODO:
75-
// Should this attribute not be included when no-select-on-click is set
76-
// since this attribute implies keyboard navigation?
77-
'aria-multiselectable': !this.isSelectable
78-
? null
79-
: this.selectableIsMultiSelect
80-
? 'true'
81-
: 'false'
82-
}
73+
return this.isSelectable
74+
? {
75+
role: 'grid',
76+
// TODO:
77+
// Should this attribute not be included when `no-select-on-click` is set
78+
// since this attribute implies keyboard navigation?
79+
'aria-multiselectable': String(this.selectableIsMultiSelect)
80+
}
81+
: {}
8382
}
8483
},
8584
watch: {

0 commit comments

Comments
 (0)