|
@@ -16,7 +16,8 @@ module.exports = class ProgressBar extends Plugin {
|
|
const defaultOptions = {
|
|
const defaultOptions = {
|
|
target: 'body',
|
|
target: 'body',
|
|
replaceTargetContent: false,
|
|
replaceTargetContent: false,
|
|
- fixed: false
|
|
|
|
|
|
+ fixed: false,
|
|
|
|
+ hideAfterFinish: true
|
|
}
|
|
}
|
|
|
|
|
|
// merge default options with the ones set by user
|
|
// merge default options with the ones set by user
|
|
@@ -27,8 +28,8 @@ module.exports = class ProgressBar extends Plugin {
|
|
|
|
|
|
render (state) {
|
|
render (state) {
|
|
const progress = state.totalProgress || 0
|
|
const progress = state.totalProgress || 0
|
|
-
|
|
|
|
- return <div class="uppy uppy-ProgressBar" style={{ position: this.opts.fixed ? 'fixed' : 'initial' }}>
|
|
|
|
|
|
+ const isHidden = progress === 100 && this.opts.hideAfterFinish
|
|
|
|
+ return <div class="uppy uppy-ProgressBar" style={{ position: this.opts.fixed ? 'fixed' : 'initial' }} aria-hidden={isHidden}>
|
|
<div class="uppy-ProgressBar-inner" style={{ width: progress + '%' }} />
|
|
<div class="uppy-ProgressBar-inner" style={{ width: progress + '%' }} />
|
|
<div class="uppy-ProgressBar-percentage">{progress}</div>
|
|
<div class="uppy-ProgressBar-percentage">{progress}</div>
|
|
</div>
|
|
</div>
|