Skip to content

Commit

Permalink
SAK-40229 Content screen reader announcing file upload to dropbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharadhi authored and Sharadhi committed Oct 30, 2024
1 parent 09a03ab commit 0e778b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions content/content-bundles/resources/types.properties
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ processmessage.save.html=Saving HTML page
processmessage.save.text=Saving text document
processmessage.save.file=Saving new file(s)
processmessage.save.url=Saving link(s)
label.success = Successfully uploaded: {0}
label.time = Time:
label.update = Update
label.upl = Upload New Version Now
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
<label for="MultipleFolderContent">$tlang.getString("label.upload")</label>
#end
<input type="file" name="MultipleFolderContent" id="MultipleFolderContent" class="upload" onChange="handleFileChange()"/>
<div id="fileUploadFeedback" aria-live="polite" class="upload-feedback" role="status" style="display:none;"></div>
<div id="fileUploadFeedback" aria-live="polite" class="upload-feedback" role="status" style="display:none;">
$tlang.getString('label.success')
</div>
</div>
<div class="form-group">
<label for="MultipleFolderDisplayName">$tlang.getString("label.display")</label>
Expand Down Expand Up @@ -238,16 +240,16 @@
if (input.files.length > 0)
{
const fileName = input.files[0].name;
feedback.textContent = `Successfully uploaded: ${fileName}`;
const successTemplate = feedback.textContent;
feedback.textContent = successTemplate.replace("{0}", fileName);
feedback.style.display = 'block';

setTimeout(() => {
feedback.style.display = 'none';
feedback.style.display = 'none';
}, 10000);
}
else
{
feedback.textContent = 'No file selected.';
feedback.style.display = 'block';
}
}
Expand Down

0 comments on commit 0e778b0

Please sign in to comment.