From c04ea2897e101230ff3776e002bc5c209349df29 Mon Sep 17 00:00:00 2001 From: Yury Delendik <ydelendik@mozilla.com> Date: Fri, 4 May 2012 09:51:21 -0500 Subject: [PATCH] Addressing accessebility aspects --- web/viewer.css | 4 ++++ web/viewer.html | 50 +++++++++++++++++++++++++++++++++++++------------ 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/web/viewer.css b/web/viewer.css index acaca9865..d99c109c9 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -175,6 +175,10 @@ body { height: 25px; } +.toolbarButton > span { + display: none; +} + .toolbarButton[disabled] { opacity: .5; } diff --git a/web/viewer.html b/web/viewer.html index 6711a67d1..0e90cd51c 100644 --- a/web/viewer.html +++ b/web/viewer.html @@ -43,8 +43,12 @@ <div id="sidebarContainer"> <div id="toolbarSidebar"> <div class="splitToolbarButton toggled"> - <button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" onclick="PDFView.switchSidebarView('thumbs')" tabindex="1"></button> - <button id="viewOutline" class="toolbarButton" title="Show Document Outline" onclick="PDFView.switchSidebarView('outline')" tabindex="2"></button> + <button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" onclick="PDFView.switchSidebarView('thumbs')" tabindex="1"> + <span>Thumbnails</span> + </button> + <button id="viewOutline" class="toolbarButton" title="Show Document Outline" onclick="PDFView.switchSidebarView('outline')" tabindex="2"> + <span>Document Outline</span> + </button> </div> </div> <div id="sidebarContent"> @@ -61,14 +65,20 @@ <div id="toolbarViewer"> <div id="toolbarViewerLeft"> - <button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="3"></button> + <button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="3"> + <span>Toggle Sidebar</span> + </button> <div class="toolbarButtonSpacer"></div> <div class="splitToolbarButton"> - <button class="toolbarButton pageUp" title="Previous Page" onclick="PDFView.page--" id="previous" tabindex="4"></button> + <button class="toolbarButton pageUp" title="Previous Page" onclick="PDFView.page--" id="previous" tabindex="4"> + <span>Previous</span> + </button> <div class="splitToolbarButtonSeparator"></div> - <button class="toolbarButton pageDown" title="Next Page" onclick="PDFView.page++" id="next" tabindex="5"></button> + <button class="toolbarButton pageDown" title="Next Page" onclick="PDFView.page++" id="next" tabindex="5"> + <span>Next</span> + </button> </div> - <div class="toolbarLabel">Page: </div> + <label class="toolbarLabel" for="pageNumber">Page: </label> <input type="number" id="pageNumber" class="toolbarField pageNumber" onchange="PDFView.page = this.value;" value="1" size="4" min="1" tabindex="6"> </input> <span id="numPages" class="toolbarLabel"></span> @@ -76,21 +86,37 @@ <div id="toolbarViewerRight"> <input id="fileInput" class="fileInput" type="file" oncontextmenu="return false;" tabindex="10" /> - <!-- <input id="fileInput" class="fileInput" type="file" oncontextmenu="return false;" style="visibility: hidden; position: fixed; right: 0; top: 0" /> --> - <!-- <button id="openFile" class="toolbarButton print" title="Open" tabindex="10" onclick="document.getElementById('fileInput').click()"></button> --> + <!-- + <input id="fileInput" class="fileInput" type="file" oncontextmenu="return false;" style="visibility: hidden; position: fixed; right: 0; top: 0" /> + <button id="openFile" class="toolbarButton print" title="Open" tabindex="10" onclick="document.getElementById('fileInput').click()"> + <span>Open</span> + </button> + --> - <!-- <button id="print" class="toolbarButton print" title="Print" tabindex="11" onclick="window.print()"></button> --> - <button id="download" class="toolbarButton download" title="Download" onclick="PDFView.download();" tabindex="12"></button> + <!-- + <button id="print" class="toolbarButton print" title="Print" tabindex="11" onclick="window.print()"> + <span>Print</span> + </button> + --> + + <button id="download" class="toolbarButton download" title="Download" onclick="PDFView.download();" tabindex="12"> + <span>Download</span> + </button> <!-- <div class="toolbarButtonSpacer"></div> --> <a href="#" id="viewBookmark" class="toolbarButton bookmark" title="Bookmark (or copy) current location" tabindex="13"> + <span>Bookmark</span> </a> </div> <div class="outerCenter"> <div class="innerCenter" id="toolbarViewerMiddle"> <div class="splitToolbarButton"> - <button class="toolbarButton zoomOut" title="Zoom Out" onclick="PDFView.zoomOut();" tabindex="7"></button> + <button class="toolbarButton zoomOut" title="Zoom Out" onclick="PDFView.zoomOut();" tabindex="7"> + <span>Zoom Out</span> + </button> <div class="splitToolbarButtonSeparator"></div> - <button class="toolbarButton zoomIn" title="Zoom In" onclick="PDFView.zoomIn();" tabindex="8"></button> + <button class="toolbarButton zoomIn" title="Zoom In" onclick="PDFView.zoomIn();" tabindex="8"> + <span>Zoom In</span> + </button> </div> <span class="dropdownToolbarButton"> <select id="scaleSelect" onchange="PDFView.parseScale(this.value);" oncontextmenu="return false;" tabindex="9">