aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-01-05 15:44:49 -0500
committerScott González <scott.gonzalez@gmail.com>2015-01-05 16:50:27 -0500
commitab798cb4646cfeb79f1949eb70cd64813a248d87 (patch)
tree5ac7c394b617bcf1c956c0d2c82539c63fbea0e4 /ui
parentc89cb74893c4f99d6163e29110c36d9e02dc7df1 (diff)
downloadjquery-ui-ab798cb4646cfeb79f1949eb70cd64813a248d87.tar.gz
jquery-ui-ab798cb4646cfeb79f1949eb70cd64813a248d87.zip
Accordion: Set `aria-expanded` when collapsing
Fixes #10703 Closes gh-1413
Diffstat (limited to 'ui')
-rw-r--r--ui/accordion.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/ui/accordion.js b/ui/accordion.js
index ef1357b8e..e904df2be 100644
--- a/ui/accordion.js
+++ b/ui/accordion.js
@@ -488,7 +488,10 @@ return $.widget( "ui.accordion", {
toHide.attr({
"aria-hidden": "true"
});
- toHide.prev().attr( "aria-selected", "false" );
+ toHide.prev().attr({
+ "aria-selected": "false",
+ "aria-expanded": "false"
+ });
// if we're switching panels, remove the old header from the tab order
// if we're opening from collapsed state, remove the previous header from the tab order
// if we're collapsing, then keep the collapsing header in the tab order
@@ -499,7 +502,7 @@ return $.widget( "ui.accordion", {
});
} else if ( toShow.length ) {
this.headers.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
+ return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
})
.attr( "tabIndex", -1 );
}
@@ -509,8 +512,8 @@ return $.widget( "ui.accordion", {
.prev()
.attr({
"aria-selected": "true",
- tabIndex: 0,
- "aria-expanded": "true"
+ "aria-expanded": "true",
+ tabIndex: 0
});
},