});
test( "accessibility", function () {
- expect( 9 );
+ expect( 13 );
var ac = $( "#list1" ).accordion().accordion( "option", "active", 1 );
var headers = $( ".ui-accordion-header" );
equals( headers.next().attr( "role" ), "tabpanel", "tabpanel roles" );
equals( headers.eq( 1 ).attr( "aria-expanded" ), "true", "active tab has aria-expanded" );
equals( headers.eq( 0 ).attr( "aria-expanded" ), "false", "inactive tab has aria-expanded" );
+ equals( headers.eq( 1 ).attr( "aria-selected" ), "true", "active tab has aria-selected" );
+ equals( headers.eq( 0 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected" );
ac.accordion( "option", "active", 0 );
equals( headers.eq( 0 ).attr( "aria-expanded" ), "true", "newly active tab has aria-expanded" );
equals( headers.eq( 1 ).attr( "aria-expanded" ), "false", "newly inactive tab has aria-expanded" );
+ equals( headers.eq( 0 ).attr( "aria-selected" ), "true", "active tab has aria-selected" );
+ equals( headers.eq( 1 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected" );
});
}( jQuery ) );
.not( self.active )
.attr({
"aria-expanded": "false",
+ "aria-selected": "false",
tabIndex: -1
})
.next()
self.active
.attr({
"aria-expanded": "true",
+ "aria-selected": "true",
tabIndex: 0
});
}
.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" )
toHide.prev()
.attr({
"aria-expanded": "false",
+ "aria-selected": "false",
tabIndex: -1
})
.blur();
toShow.prev()
.attr({
"aria-expanded": "true",
+ "aria-selected": "true",
tabIndex: 0
})
.focus();