From 82c407c25777e5f89d52aa6dff06160d38ae1972 Mon Sep 17 00:00:00 2001 From: Bohung Date: Fri, 18 Jun 2021 10:55:40 +0800 Subject: [PATCH] Edit for accessibility. --- app/assets/javascripts/archive/pdf/viewer.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/assets/javascripts/archive/pdf/viewer.js b/app/assets/javascripts/archive/pdf/viewer.js index 6539ef4..eedc602 100644 --- a/app/assets/javascripts/archive/pdf/viewer.js +++ b/app/assets/javascripts/archive/pdf/viewer.js @@ -2093,10 +2093,16 @@ function webViewerInitialized() { var params = (0, _ui_utils.parseQueryString)(queryString); file = document.body.dataset.url; 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"); fileInput.id = appConfig.openFileInputName; fileInput.className = "fileInput"; fileInput.setAttribute("type", "file"); + fileInput.setAttribute("title", "File Input"); fileInput.oncontextmenu = _ui_utils.noContextMenuHandler; document.body.appendChild(fileInput); @@ -10208,6 +10214,10 @@ var PDFThumbnailView = /*#__PURE__*/function () { ring.style.height = this.canvasHeight + borderAdjustment + "px"; this.ring = ring; div.appendChild(ring); + var span = document.createElement("span"); + span.setAttribute("style","display: none;"); + span.innerHTML = this.id; + div.appendChild(span); anchor.appendChild(div); container.appendChild(anchor); }