add aria-value min, max and now for progressbar upload
This commit is contained in:
parent
02f313c204
commit
43039d1755
1 changed files with 2 additions and 1 deletions
|
@ -32,6 +32,7 @@ export default class ProgressBar {
|
||||||
const element = getDirectUploadProgressElement(id);
|
const element = getDirectUploadProgressElement(id);
|
||||||
if (element) {
|
if (element) {
|
||||||
element.style.width = `${progress}%`;
|
element.style.width = `${progress}%`;
|
||||||
|
element.setAttribute('aria-valuenow', progress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +53,7 @@ export default class ProgressBar {
|
||||||
|
|
||||||
static render(id, filename) {
|
static render(id, filename) {
|
||||||
return `<div id="direct-upload-${id}" class="direct-upload ${PENDING_CLASS}" data-direct-upload-id="${id}">
|
return `<div id="direct-upload-${id}" class="direct-upload ${PENDING_CLASS}" data-direct-upload-id="${id}">
|
||||||
<div class="direct-upload__progress" style="width: 0%"></div>
|
<div role="progressbar" aria-valuemin="0" aria-valuemax="100" class="direct-upload__progress" style="width: 0%"></div>
|
||||||
<span class="direct-upload__filename">${filename}</span>
|
<span class="direct-upload__filename">${filename}</span>
|
||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue