diff options
author | Scott González <scott.gonzalez@gmail.com> | 2011-07-12 11:36:34 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-07-12 11:36:34 -0400 |
commit | 0080f2d5813747cbbe44021197e352564e02b782 (patch) | |
tree | 9b2ead710771dd942f959577b16d57de23b05d02 /ui/jquery.ui.menubar.js | |
parent | da84672db8ad1f3909e645a665e9a9c6c0de0ded (diff) | |
download | jquery-ui-0080f2d5813747cbbe44021197e352564e02b782.tar.gz jquery-ui-0080f2d5813747cbbe44021197e352564e02b782.zip |
Use .attr() for boolean ARIA attributes.
Diffstat (limited to 'ui/jquery.ui.menubar.js')
-rw-r--r-- | ui/jquery.ui.menubar.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/ui/jquery.ui.menubar.js b/ui/jquery.ui.menubar.js index 2ce59bd6c..0f80f4fda 100644 --- a/ui/jquery.ui.menubar.js +++ b/ui/jquery.ui.menubar.js @@ -48,9 +48,9 @@ $.widget( "ui.menubar", { } }) .hide() - .prop({ - "aria-hidden": true, - "aria-expanded": false + .attr({ + "aria-hidden": "true", + "aria-expanded": "false" }) .bind( "keydown.menubar", function( event ) { var menu = $( this ); @@ -108,7 +108,7 @@ $.widget( "ui.menubar", { }) .addClass( "ui-button ui-widget ui-button-text-only ui-menubar-link" ) .attr( "role", "menuitem" ) - .prop( "aria-haspopup", true ) + .attr( "aria-haspopup", "true" ) .wrapInner( "<span class='ui-button-text'></span>" ); // TODO review if these options are a good choice, maybe they can be merged @@ -158,7 +158,7 @@ $.widget( "ui.menubar", { .unbind( ".menubar" ) .removeClass( "ui-button ui-widget ui-button-text-only ui-menubar-link ui-state-default" ) .removeAttr( "role" ) - .removeProp( "aria-haspopup" ) + .removeAttr( "aria-haspopup" ) // TODO unwrap? .children( "span.ui-button-text" ).each(function( i, e ) { var item = $( this ); @@ -170,8 +170,8 @@ $.widget( "ui.menubar", { this.element.find( ":ui-menu" ) .menu( "destroy" ) .show() - .removeProp( "aria-hidden" ) - .removeProp( "aria-expanded" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-expanded" ) .removeAttr( "tabindex" ) .unbind( ".menubar" ); }, @@ -182,9 +182,9 @@ $.widget( "ui.menubar", { this.active .menu( "closeAll" ) .hide() - .prop({ - "aria-hidden": true, - "aria-expanded": false + .attr({ + "aria-hidden": "true", + "aria-expanded": "false" }); this.active .prev() @@ -204,9 +204,9 @@ $.widget( "ui.menubar", { this.active .menu( "closeAll" ) .hide() - .prop({ - "aria-hidden": true, - "aria-expanded": false + .attr({ + "aria-hidden": "true", + "aria-expanded": "false" }); this.active .prev() @@ -221,8 +221,8 @@ $.widget( "ui.menubar", { at: "left bottom", of: button }) - .removeProp( "aria-hidden" ) - .prop( "aria-expanded", true ) + .removeAttr( "aria-hidden" ) + .attr( "aria-expanded", "true" ) .menu("focus", event, menu.children( "li" ).first() ) // TODO need a comment here why both events are triggered .focus() |