aboutsummaryrefslogtreecommitdiffstats
path: root/ui/tabs.js
diff options
context:
space:
mode:
authorDavid Petersen <public@petersendidit.com>2014-05-18 21:58:41 -0500
committerScott González <scott.gonzalez@gmail.com>2014-05-19 11:36:21 -0400
commitf5e8041ebf1e0b36d67d1716a0cfec44692fabb8 (patch)
treed0efbcbb9c60e2a67f91b3d4870893c05ff44682 /ui/tabs.js
parent975c9ecc94e9c44a27bfa1c28975f61b5c2a36c0 (diff)
downloadjquery-ui-f5e8041ebf1e0b36d67d1716a0cfec44692fabb8.tar.gz
jquery-ui-f5e8041ebf1e0b36d67d1716a0cfec44692fabb8.zip
Tabs: Move `aria-expanded` from active panel to active tab
Fixes #9622 Closes gh-1251
Diffstat (limited to 'ui/tabs.js')
-rw-r--r--ui/tabs.js18
1 files changed, 8 insertions, 10 deletions
diff --git a/ui/tabs.js b/ui/tabs.js
index 2232b3ecf..2f1304e77 100644
--- a/ui/tabs.js
+++ b/ui/tabs.js
@@ -360,12 +360,12 @@ return $.widget( "ui.tabs", {
this.tabs.not( this.active ).attr({
"aria-selected": "false",
+ "aria-expanded": "false",
tabIndex: -1
});
this.panels.not( this._getPanelForTab( this.active ) )
.hide()
.attr({
- "aria-expanded": "false",
"aria-hidden": "true"
});
@@ -377,12 +377,12 @@ return $.widget( "ui.tabs", {
.addClass( "ui-tabs-active ui-state-active" )
.attr({
"aria-selected": "true",
+ "aria-expanded": "true",
tabIndex: 0
});
this._getPanelForTab( this.active )
.show()
.attr({
- "aria-expanded": "true",
"aria-hidden": "false"
});
}
@@ -634,11 +634,11 @@ return $.widget( "ui.tabs", {
show();
}
- toHide.attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
+ toHide.attr( "aria-hidden", "true" );
+ eventData.oldTab.attr({
+ "aria-selected": "false",
+ "aria-expanded": "false"
});
- eventData.oldTab.attr( "aria-selected", "false" );
// If we're switching tabs, remove the old tab from the tab order.
// If we're opening from collapsed state, remove the previous tab from the tab order.
// If we're collapsing, then keep the collapsing tab in the tab order.
@@ -651,12 +651,10 @@ return $.widget( "ui.tabs", {
.attr( "tabIndex", -1 );
}
- toShow.attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
+ toShow.attr( "aria-hidden", "false" );
eventData.newTab.attr({
"aria-selected": "true",
+ "aria-expanded": "true",
tabIndex: 0
});
},