Problem/Motivation

The <iframe>/<object>/<embed> elements output by the renderers have no title attribute. Screen reader users hear an unnamed frame and can’t tell which document it contains. This fails WCAG 2.x 4.1.2 Name, Role, Value (technique H64).

Steps to reproduce

Use a screenreader to access the document

Proposed resolution

Pass a document name into each renderer’s template and output it as the frame’s title.

Name source, in this order: the media entity’s label (when the field is on a media entity), then the file’s description, then the filename.

The change only adds a title attribute. Existing template overrides keep working, because a new theme variable is ignored by templates that don’t use it.

Remaining tasks

User interface changes

None

API changes

Adds a title variable to the pdf_reader, pdf_reader_embed (and any other affected) hooks.

Data model changes

None

Issue fork pdf_reader-3635968

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

whthat created an issue. See original summary.

whthat’s picture

Issue summary: View changes
Status: Active » Postponed
Related issues: +#3635944: Add GitLab CI and kernel test coverage for the PDF Reader formatter