Skip to content
Browse files

Omit aria-valuenow for the indeterminate global progress bar.

Remove the unnecessary aria-valuetext attribute.
  • Loading branch information...
1 parent 6cd1ed0 commit bbb1156c0e64c04c8489f8b237c7bcc4478be6d7 @blueimp committed May 26, 2012
Showing with 7 additions and 8 deletions.
  1. +2 −2 index.html
  2. +3 −4 js/jquery.fileupload-ui.js
  3. +2 −2 test/index.html
View
4 index.html
@@ -94,7 +94,7 @@
<!-- The global progress information -->
<div class="span5 fileupload-progress fade">
<!-- The global progress bar -->
- <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-valuetext="0%">
+ <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="bar" style="width:0%;"></div>
</div>
<!-- The extended global progress information -->
@@ -157,7 +157,7 @@ <h3 class="modal-title"></h3>
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
{% } else if (o.files.valid && !i) { %}
<td>
- <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-valuetext="0%"><div class="bar" style="width:0%;"></div></div>
+ <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="bar" style="width:0%;"></div></div>
</td>
<td class="start">{% if (!o.options.autoUpload) { %}
<button class="btn btn-primary">
View
7 js/jquery.fileupload-ui.js
@@ -129,7 +129,6 @@
!$.support.transition && 'progress-animated'
)
.attr('aria-valuenow', 100)
- .attr('aria-valuetext', '100%')
.find('.bar').css(
'width',
'100%'
@@ -232,7 +231,6 @@
var progress = parseInt(data.loaded / data.total * 100, 10);
data.context.find('.progress')
.attr('aria-valuenow', progress)
- .attr('aria-valuetext', progress + '%')
.find('.bar').css(
'width',
progress + '%'
@@ -254,7 +252,6 @@
globalProgressNode
.find('.progress')
.attr('aria-valuenow', progress)
- .attr('aria-valuetext', progress + '%')
.find('.bar').css(
'width',
progress + '%'
@@ -274,7 +271,9 @@
var that = $(this).data('fileupload');
that._transition($(this).find('.fileupload-progress')).done(
function () {
- $(this).find('.bar').css('width', '0%').parent().attr('aria-valuenow', '0').attr('aria-valuetext', '0%');
+ $(this).find('.progress')
+ .attr('aria-valuenow', '0')
+ .find('.bar').css('width', '0%');
$(this).find('.progress-extended').html('&nbsp;');
that._trigger('stopped', e);
}
View
4 test/index.html
@@ -53,7 +53,7 @@ <h2 id="qunit-userAgent"></h2>
<!-- The global progress information -->
<div class="span5 fileupload-progress fade">
<!-- The global progress bar -->
- <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-valuetext="0%">
+ <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="bar" style="width:0%;"></div>
</div>
<!-- The extended global progress information -->
@@ -78,7 +78,7 @@ <h2 id="qunit-userAgent"></h2>
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
{% } else if (o.files.valid && !i) { %}
<td>
- <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-valuetext="0%"><div class="bar" style="width:0%;"></div></div>
+ <div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="bar" style="width:0%;"></div></div>
</td>
<td class="start">{% if (!o.options.autoUpload) { %}
<button class="btn btn-primary">

0 comments on commit bbb1156

Please sign in to comment.
Something went wrong with that request. Please try again.