aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2011-03-15 04:30:36 -0400
committerRichard Worth <rdworth@gmail.com>2011-03-15 04:30:36 -0400
commit056cab82d8b710953f79cc833b468cb1a24cba9c (patch)
treea6617caa01e4c94ba9fb2cdbc6ce429188d6c465 /ui
parent84257e7f0ae20b81b085f1360c15defdd2b89ea9 (diff)
downloadjquery-ui-056cab82d8b710953f79cc833b468cb1a24cba9c.tar.gz
jquery-ui-056cab82d8b710953f79cc833b468cb1a24cba9c.zip
Accordion: set aria-selected to true on selected header, false on others. Fixed #7078 - Accordion: Set aria-selected
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.accordion.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js
index 34327be27..7f67814b4 100644
--- a/ui/jquery.ui.accordion.js
+++ b/ui/jquery.ui.accordion.js
@@ -75,6 +75,7 @@ $.widget( "ui.accordion", {
.not( self.active )
.attr({
"aria-expanded": "false",
+ "aria-selected": "false",
tabIndex: -1
})
.next()
@@ -87,6 +88,7 @@ $.widget( "ui.accordion", {
self.active
.attr({
"aria-expanded": "true",
+ "aria-selected": "true",
tabIndex: 0
});
}
@@ -129,6 +131,7 @@ $.widget( "ui.accordion", {
.removeClass( "ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
.removeAttr( "role" )
.removeAttr( "aria-expanded" )
+ .removeAttr( "aria-selected" )
.removeAttr( "tabIndex" )
.find( "a" )
.removeAttr( "tabIndex" )
@@ -387,12 +390,14 @@ $.widget( "ui.accordion", {
toHide.prev()
.attr({
"aria-expanded": "false",
+ "aria-selected": "false",
tabIndex: -1
})
.blur();
toShow.prev()
.attr({
"aria-expanded": "true",
+ "aria-selected": "true",
tabIndex: 0
})
.focus();