From 129e9d3335256d1f2884c9bd610d0c109855ffe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20M=C3=BCller?= Date: Sun, 31 Jan 2021 21:42:08 +0100 Subject: [PATCH] fix(b-table): prefer user-provided `role` attribute --- src/components/table/helpers/mixin-selectable.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/table/helpers/mixin-selectable.js b/src/components/table/helpers/mixin-selectable.js index a17f1619d37..82cc580c618 100644 --- a/src/components/table/helpers/mixin-selectable.js +++ b/src/components/table/helpers/mixin-selectable.js @@ -70,13 +70,15 @@ export const selectableMixin = Vue.extend({ } }, selectableTableAttrs() { + const role = this.bvAttrs.role || 'grid' + return this.isSelectable ? { - role: 'grid', + role, // TODO: // Should this attribute not be included when `no-select-on-click` is set // since this attribute implies keyboard navigation? - 'aria-multiselectable': String(this.selectableIsMultiSelect) + 'aria-multiselectable': role === 'grid' ? String(this.selectableIsMultiSelect) : null } : {} }