diff --git a/src/components/tabs/package.json b/src/components/tabs/package.json index 49e8c3c10f0..8753bcb2a9c 100644 --- a/src/components/tabs/package.json +++ b/src/components/tabs/package.json @@ -162,6 +162,11 @@ "prop": "titleLinkClass", "description": "CSS class (or classes) to apply to the tab's control button inner link element" }, + { + "prop": "titleLinkAttributes", + "version": "2.6.0", + "description": "Attributes to apply to the tab's control button inner link element" + }, { "prop": "noBody", "description": "When the parent b-tabs has the 'card' prop set, do not render a card-body wrapper" diff --git a/src/components/tabs/tab.js b/src/components/tabs/tab.js index a8015a97fb1..0149bfc8c0f 100644 --- a/src/components/tabs/tab.js +++ b/src/components/tabs/tab.js @@ -39,6 +39,10 @@ export const BTab = /*#__PURE__*/ Vue.extend({ type: [String, Array, Object], default: null }, + titleLinkAttributes: { + type: Object, + default: null + }, disabled: { type: Boolean, default: false diff --git a/src/components/tabs/tabs.js b/src/components/tabs/tabs.js index 7cc0ac960eb..792a68bc169 100644 --- a/src/components/tabs/tabs.js +++ b/src/components/tabs/tabs.js @@ -115,6 +115,7 @@ const BTabButtonHelper = /*#__PURE__*/ Vue.extend({ ], props: { disabled: this.tab.disabled }, attrs: { + ...this.tab.titleLinkAttributes, role: 'tab', id: this.id, // Roving tab index when keynav enabled