]> git.parisson.com Git - pdf.js.git/commitdiff
Accessibility labels for page previews
authorYury Delendik <ydelendik@mozilla.com>
Tue, 8 May 2012 19:40:08 +0000 (14:40 -0500)
committerYury Delendik <ydelendik@mozilla.com>
Tue, 8 May 2012 19:40:08 +0000 (14:40 -0500)
l10n/en-US/viewer.properties
l10n/xx/viewer.properties
web/viewer.js

index ed632b17a216d300899f7854b8203c83e89cd0cc..c8dbe4aba4c16074feef143eab7699093900b8e7 100644 (file)
@@ -40,3 +40,5 @@ download_label=Download
 zoom_out_label=Zoom Out
 zoom_in_label=Zoom In
 zoom.title=Zoom
+thumb_page_title=Page {{page}}
+thumb_page_canvas=Thumbnail of Page {{page}}
index 5b9971d0b002645da546513e15401397f8dd36aa..e26f79422ca23ea556ea544fab7da3313a46dafb 100644 (file)
@@ -40,3 +40,5 @@ download_label=<<<_ÐOẂпḻOãÐ_>>>
 zoom_out_label=<<<_ƩOOм Oȗţ_>>>
 zoom_in_label=<<<_ƩOOм iп_>>>
 zoom.title=<<<_ƩOOм_>>>
+thumb_page_title=<<<_Þãģε {{page}}_>>>
+thumb_page_canvas=<<<_ţНȗмьпãiḻ O£ Þãģε {{page}}_>>>
index e8eb9ad3b6c762247ea696737915c89311994f0d..dcbfcf14e6e14e8074930e16195e472316d7495e 100644 (file)
@@ -1070,7 +1070,8 @@ var PageView = function pageView(container, pdfPage, id, scale,
 var ThumbnailView = function thumbnailView(container, pdfPage, id) {
   var anchor = document.createElement('a');
   anchor.href = PDFView.getAnchorUrl('#page=' + id);
-  anchor.onclick = function stopNivigation() {
+  anchor.title = mozL10n.get('thumb_page_title', {page: id}, 'Page {{page}}');
+  anchor.onclick = function stopNavigation() {
     PDFView.page = id;
     return false;
   };
@@ -1103,6 +1104,8 @@ var ThumbnailView = function thumbnailView(container, pdfPage, id) {
     canvas.width = canvasWidth;
     canvas.height = canvasHeight;
     canvas.className = 'thumbnailImage';
+    canvas.setAttribute('aria-label', mozL10n.get('thumb_page_canvas',
+      {page: id}, 'Thumbnail of Page {{page}}'));
 
     div.setAttribute('data-loaded', true);