Skip to content

Commit b534a2b

Browse files
committed
📦 Build
1 parent c2b0aac commit b534a2b

File tree

6 files changed

+48
-18
lines changed

6 files changed

+48
-18
lines changed

‎dist/vue-tabs.common.js‎

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-nav-tabs v0.5.5
2+
* vue-nav-tabs v0.5.6
33
* (c) 2017-present cristij <joracristi@gmail.com>
44
* Released under the MIT License.
55
*/
@@ -176,14 +176,19 @@ var VueTabs = {
176176
if (!tab) return;
177177
var route = tab.route,
178178
id = tab.id,
179-
title = tab.title;
179+
title = tab.title,
180+
icon = tab.icon,
181+
tabId = tab.tabId;
180182

181183
var active = _this.activeTabIndex === index;
182184
return h(
183185
'li',
184186
{
185187
attrs: { name: 'tab',
186-
role: 'presentation' },
188+
id: 't-' + tabId,
189+
'aria-selected': active,
190+
'aria-controls': 'p-' + tabId,
191+
role: 'tab' },
187192
on: {
188193
'click': function click() {
189194
return !tab.disabled && _this.navigateToTab(index, route);
@@ -197,9 +202,14 @@ var VueTabs = {
197202
{
198203
attrs: { href: '#',
199204

200-
'aria-selected': active,
201-
'aria-controls': '#' + id,
202205
role: 'tab' },
206+
on: {
207+
'click': function click(e) {
208+
e.preventDefault();
209+
return false;
210+
}
211+
},
212+
203213
style: active ? _this.activeTabStyle : _this.tabStyles(tab),
204214
'class': [{ 'active_tab': active }, 'tabs__link'] },
205215
[_this.textPosition !== 'center' && !tab.$slots.title && _this.renderIcon(index), _this.textPosition === 'center' && _this.renderTabTitle(index, _this.textPosition)]
@@ -287,6 +297,9 @@ var VTab = {
287297
},
288298
hash: function hash() {
289299
return '#' + this.id;
300+
},
301+
tabId: function tabId() {
302+
return this.id ? this.id : this.title;
290303
}
291304
},
292305
data: function data() {
@@ -310,7 +323,9 @@ var VTab = {
310323
return h(
311324
'section',
312325
{ 'class': 'tab-container',
313-
attrs: { role: 'tabpanel' },
326+
attrs: { id: 'p-' + this.tabId,
327+
'aria-labelledby': 't-' + this.tabId,
328+
role: 'tabpanel' },
314329
directives: [{
315330
name: 'show',
316331
value: this.active

‎dist/vue-tabs.common.min.js‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)