Edit for accessibility.

This commit is contained in:
BoHung Chiu 2021-06-18 10:55:40 +08:00
parent e9554417fa
commit 82c407c257
1 changed files with 10 additions and 0 deletions

View File

@ -2093,10 +2093,16 @@ function webViewerInitialized() {
var params = (0, _ui_utils.parseQueryString)(queryString); var params = (0, _ui_utils.parseQueryString)(queryString);
file = document.body.dataset.url; file = document.body.dataset.url;
validateFileURL(file); validateFileURL(file);
var fileInput_label = document.createElement("label");
fileInput_label.setAttribute("for",appConfig.openFileInputName);
fileInput_label.setAttribute("style", "display: none;");
fileInput_label.innerHTML = "File Input";
document.body.appendChild(fileInput_label);
var fileInput = document.createElement("input"); var fileInput = document.createElement("input");
fileInput.id = appConfig.openFileInputName; fileInput.id = appConfig.openFileInputName;
fileInput.className = "fileInput"; fileInput.className = "fileInput";
fileInput.setAttribute("type", "file"); fileInput.setAttribute("type", "file");
fileInput.setAttribute("title", "File Input");
fileInput.oncontextmenu = _ui_utils.noContextMenuHandler; fileInput.oncontextmenu = _ui_utils.noContextMenuHandler;
document.body.appendChild(fileInput); document.body.appendChild(fileInput);
@ -10208,6 +10214,10 @@ var PDFThumbnailView = /*#__PURE__*/function () {
ring.style.height = this.canvasHeight + borderAdjustment + "px"; ring.style.height = this.canvasHeight + borderAdjustment + "px";
this.ring = ring; this.ring = ring;
div.appendChild(ring); div.appendChild(ring);
var span = document.createElement("span");
span.setAttribute("style","display: none;");
span.innerHTML = this.id;
div.appendChild(span);
anchor.appendChild(div); anchor.appendChild(div);
container.appendChild(anchor); container.appendChild(anchor);
} }