diff options
author | Richard Worth <rdworth@gmail.com> | 2011-03-15 04:52:24 -0400 |
---|---|---|
committer | Richard Worth <rdworth@gmail.com> | 2011-03-15 04:52:24 -0400 |
commit | 69ebdf46a596de6e6889f9532fdad6ad841cc765 (patch) | |
tree | 897846a40ff8a3c74e59cd7d297909a502cc7942 /ui/jquery.ui.accordion.js | |
parent | 6bbc43113ccd2722919e4149248c3316c143b287 (diff) | |
download | jquery-ui-69ebdf46a596de6e6889f9532fdad6ad841cc765.tar.gz jquery-ui-69ebdf46a596de6e6889f9532fdad6ad841cc765.zip |
Accordion: set aria-selected to true on selected header, false on others. Fixed #7078 - Accordion: Set aria-selected
Diffstat (limited to 'ui/jquery.ui.accordion.js')
-rw-r--r-- | ui/jquery.ui.accordion.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index aac9a4891..9419089b5 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -114,6 +114,7 @@ $.widget( "ui.accordion", { .not( self.active || "" ) .attr({ "aria-expanded": "false", + "aria-selected": "false", tabIndex: -1 }) .next() @@ -126,6 +127,7 @@ $.widget( "ui.accordion", { self.active .attr({ "aria-expanded": "true", + "aria-selected": "true", tabIndex: 0 }); } @@ -173,6 +175,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" ); this.headers.find( "a" ).removeAttr( "tabIndex" ); @@ -477,12 +480,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(); |