diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-12-06 09:35:41 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-12-06 09:35:41 -0500 |
commit | f1be88e7956fe9114ae20d19242cd8190a6ff399 (patch) | |
tree | 5b381155faf947db5ac295888dfbdf8303f43579 /ui | |
parent | 8c763cdf9836e9e97432167e92d0a5808e033ba2 (diff) | |
download | jquery-ui-f1be88e7956fe9114ae20d19242cd8190a6ff399.tar.gz jquery-ui-f1be88e7956fe9114ae20d19242cd8190a6ff399.zip |
Progressbar: Only remove aria-valuenow for indeterminate progressbars. Added more accessibility tests.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.progressbar.js | 8 |
1 files changed, 4 insertions, 4 deletions
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 = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" ) @@ -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 = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv ); } |