From f1be88e7956fe9114ae20d19242cd8190a6ff399 Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 6 Dec 2012 09:35:41 -0500 Subject: Progressbar: Only remove aria-valuenow for indeterminate progressbars. Added more accessibility tests. --- ui/jquery.ui.progressbar.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ui/jquery.ui.progressbar.js') diff --git a/ui/jquery.ui.progressbar.js b/ui/jquery.ui.progressbar.js index 53c9508ed..348f1d061 100644 --- a/ui/jquery.ui.progressbar.js +++ b/ui/jquery.ui.progressbar.js @@ -33,10 +33,10 @@ $.widget( "ui.progressbar", { this.element .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) .attr({ + // Only set static values, aria-valuenow and aria-valuemax are + // set inside _refreshValue() role: "progressbar", - "aria-valuemin": this.min, - "aria-valuemax": this.options.max, - "aria-valuenow": this.options.value + "aria-valuemin": this.min }); this.valueDiv = $( "
" ) @@ -126,7 +126,7 @@ $.widget( "ui.progressbar", { .width( percentage.toFixed(0) + "%" ); if ( this.indeterminate ) { - this.element.removeAttr( "aria-valuemax" ).removeAttr( "aria-valuenow" ); + this.element.removeAttr( "aria-valuenow" ); if ( !this.overlayDiv ) { this.overlayDiv = $( "
" ).appendTo( this.valueDiv ); } -- cgit v1.2.3