1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

Accessibility labels for page previews

This commit is contained in:
Yury Delendik 2012-05-08 14:40:08 -05:00
parent 80728f7acd
commit 792f508041
3 changed files with 8 additions and 1 deletions

View 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);