Skip to content

Commit

Permalink
Omit aria-valuenow for the indeterminate global progress bar.
Browse files Browse the repository at this point in the history
Remove the unnecessary aria-valuetext attribute.
  • Loading branch information
blueimp committed May 26, 2012
1 parent 6cd1ed0 commit bbb1156
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ <h1>jQuery File Upload Demo</h1>
<!-- 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 -->
Expand Down Expand Up @@ -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">
Expand Down
7 changes: 3 additions & 4 deletions js/jquery.fileupload-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
!$.support.transition && 'progress-animated'
)
.attr('aria-valuenow', 100)
.attr('aria-valuetext', '100%')
.find('.bar').css(
'width',
'100%'
Expand Down Expand Up @@ -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 + '%'
Expand All @@ -254,7 +252,6 @@
globalProgressNode
.find('.progress')
.attr('aria-valuenow', progress)
.attr('aria-valuetext', progress + '%')
.find('.bar').css(
'width',
progress + '%'
Expand All @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -->
Expand All @@ -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">
Expand Down

0 comments on commit bbb1156

Please sign in to comment.