Skip to content

Conversation

@enterayush
Copy link

Summary

Adds a localized aria-label to the Download button in the viewer toolbar to improve accessibility for screen
reader users.

Details

Previously, only the title attribute was localized, so the button did not expose an accessible name. By adding
data-l10n-attrs="title aria-label", both title and aria-label are now populated by the localization system,
consistent with other toolbar buttons.

Result

Screen readers can now correctly announce the purpose of the Download button.

Fixes: #20473

@@ -1,4 +1,4 @@
<!doctype html>
<!doctype html>
Copy link
Contributor

@timvandermeij timvandermeij Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be unrelated to the change at hand and should be reverted to keep the patch as small as possible (this is probably a UTF byte order mark added by an editor).

type="button"
tabindex="0"
data-l10n-id="pdfjs-save-button"
data-l10n-attrs="title aria-label"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me why the Download button is treated differently now compared to e.g. the Print button above. If we do this, shouldn't we do this consistently for all buttons instead?

@calixteman Are you aware of any accessibility rules from the UI/UX team around this, since we recently changed the HTML to accomodate for that better?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add aria-label to "Download" button in PDF.js viewer

3 participants