Merge pull request #1670 from yurydelendik/thumbs-alt

Accessibility labels for page previews
This commit is contained in:
Brendan Dahl 2012-05-09 09:09:26 -07:00
commit adbe74c7a6
3 changed files with 8 additions and 1 deletions

View 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}}

View 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}}_>>>

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