Did a “Link to PDF” warning appear in an Accessibility Checker audit of one of your WordPress posts or pages? Read on below for an explanation of this warning, how it impacts your website’s accessibility, and how to fix it.
Table of Contents
- About the Link to PDF Warning
- Impact on Accessibility
- How to Resolve a Link to PDF Warning
- What to do (in short)
- How to find PDFs links in your WordPress posts and pages
- Before remediation: ask if a PDF is really necessary
- Software programs to test and create accessible PDFs
- Basic principles of PDF accessibility
- Checklist for PDF accessibility
- Warn users when linking to a PDF document
- What if I can’t remediate my PDF?
- Additional PDF accessibility resources
About the Link to PDF Warning
What is a PDF?
A PDF (portable document format) is a digital file type or format for documents. PDFs are most commonly created in Adobe Acrobat, which is a part of the Adobe Creative Cloud Suite, and the PDF file type was originally created by Adobe. PDF is now an open format and PDFs can also be created by a variety of software programs including MS Office and Google Drive programs. In these programs, there is a source document, such as a Word .doc or PowerPoint .ppt, which can be exported into a PDF.
On websites, the most common types of documents that are distributed as PDFs include:
- Forms intended to be printed or filled out and emailed
- Brochures, flyers, and other marketing materials
- Reports or newsletters
What does the Link to PDF warning mean?
This warning means that one or more of the links on your post or page directs to a file with a .pdf
extension. For example, the following hyperlink code shows a link that goes to a PDF file rather than a webpage:
<a href="https://website.com/brochure.pdf">Download our Brochure</a>
The PDF may open in the same browser window, in a new tab, or download directly to a user’s computer when the link is clicked or activated.
Why does Accessibility Checker flag a warning if a PDF file is present?
PDF files can be great documents for sharing information or forms with your website visitors, particularly if they are copies of documents that you also make available in print format and are designed to be easily printable by the user. However, if not created with accessibility in mind, your PDF files may contain usability errors that make them inaccessible for people using assistive technology.
Accessibility Checker flags a warning when a PDF is present in order to remind you to manually test your PDF document for accessibility and confirm that it conforms to all relevant WCAG guidelines. Accessibility Checker cannot currently scan non-HTML or non-WordPress content for accessibility, so you must do this manually or using an automated accessibility checking tool specifically designed for PDF documents.
How does Accessibility Checker test for links to a PDF?
While auditing your page or post content, Accessibility Checker will scan all links on the post or page. If a link with a .pdf
file extension is found, then a Link to PDF warning will be flagged.
Impact on Accessibility
Why do PDFs need to be accessible?
Accessibility laws like Section 508 and the Americans with Disabilities Act (ADA) apply not just to website, but to all communications that organizations have with disabled persons.
Whether you represent a doctor’s office with PDF forms patients have to fill in before their first visit, a nonprofit posting a monthly newsletter, a large company sharing your annual report with shareholders, a small business posting an order form, or a school sharing an event flyer, all PDF documents must be accessible to people who download or view them on the web – regardless of their abilities or if they’re using assistive technology.
In addition to legally being required to maintain accessible documents, it is also vitally important for your documents to be accessible if you want people to interact with them. It goes without saying – a patient or customer cannot read and understand a form, they can’t fill it out. If your PDFs are not accessible, you limit your potential audience and risk losing conversions.
What makes a PDF accessible?
Accessible PDFs are PDF documents that have been specially formatted so that they can be read and accessed by people with disabilities. Though PDF accessibility features can help people with a broad range of disabilities, including cognitive disabilities, when PDF accessibility is discussed it is most commonly with regards to making the PDF accessible to blind and vision-impaired people who assistive technology like screen readers to read the file through text-to-speech or a refreshable Braille display.
PDFs are accessible when they include special formatting to make the content readable by a screen reader or other assistive device, and are designed in a way which ensures that the they can be navigated through using a keyboard only. Like on a website, PDFs can have tags that provides structure to the document, informs assistive technology about the order in which that content should be read, makes tables understandable to visually impaired people, and provides alternative text for images.
Can any PDF be made accessible?
Yes, it is possible to make any PDF accessible, but some documents may require a significantly greater time investment than others.
The documents that are the most challenging or time-consuming to turn into accessible PDFs are PDFs that were created by scanning something. When you scan a document to create a PDF, the content in that document is add to the PDF as a single image, not text. If you want to make a scanned PDF accessible, you first need to process the PDF through an Optical Character Recognition (OCR) process to convert the single image from the scan into actual text and other components. Depending upon the length of the document, it may be faster to recreate the PDF from scratch.
Any PDF that has text and is not a single image can be modified to include the appropriate tags and meet all relevant accessibility standards (color contrast, properly formatted tables, form labels, etc.). The amount of time this might take will depend upon the length of the document and the familiarity with the guidelines.
Are WordPress PDF embed plugins accessible?
A common question that we receive is whether plugins that embed PDF documents on your WordPress post or page are accessible. If you embed an accessible PDF into your site with a PDF plugin, will that PDF still be accessible?
The short answer is: No, most WordPress PDF embed plugins are not accessible.
The most popular PDF plugin in the WordPress.org plugin directory with over 300,000 installs uses an HTML canvas element to draw the PDF with JavaScript. This results in content that cannot be accessed by a screen reader at all. Furthermore, there is no explanation of what the canvas element is when the screen reader gets to the canvas element where the PDF is being rendered (in NVDA, for example, users simply hear the word “clickable” when encountering PDFs embedded with this plugin). Additionally, out of the box, this plugin also has insufficient color contrast for its buttons and other text on the toolbar.
There are alternate plugins with lower install counts for embedding PDFs in WordPress that are more accessible than the most widely used option. These tend to be plugins that use an iFrame or Google Docs viewer to embed the PDF, as screen readers can access content within iFrames, though there are a number of other problems we’ve encountered with these plugins such as missing iFrame titles, inaccessible buttons, etc.
Does this mean that you cannot embed PDFs on your WordPress site? No, it doesn’t mean that. You can embed PDFs on your WordPress site, but you will need to choose your PDF embed plugin carefully and will have to do some coding (or hire a developer) to ensure your embedded PDFs are accessible.
And, as shown in the image above, you want to make sure that you always provide a link to directly download the PDF so users have the ability to view them in the PDF reader that works best for their assistive technology.
Relevant WCAG 2.1 Success Criteria for all PDFs
There are a large number of Web Content Accessibility Guidelines (WCAG) success criteria that are relevant to PDF accessibility. The following are success criteria that are most relevant to all PDF documents, though other criteria may also apply. We recommend that you review WCAG 2.1 to fully determine which criteria may apply to your specific PDFs.
1.1.1 Non-text Content – Level A
All non-text content that is presented to the user has a text alternative that serves the equivalent purpose.
1.4.1 Use of Color – Level A
Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element.
1.4.3 Contrast (Minimum) – Level AA
The visual presentation of text and images of text has a contrast ratio of at least 4.5:1. Large text has a contrast ratio of 3:1. Incidental text that is purely decorative and logos do not have to meet this contrast requirement.
1.4.5 Images of Text – Level AA
If the technologies being used can achieve the visual presentation, text is used to convey information rather than images of text.
1.4.11 Non-Text Contrast – Level AA
This checkpoint specifies that graphical elements need to have a contrast ratio of at least 3:1 against adjacent colors unless the “particular presentation of graphics is essential to the information being conveyed”.
2.1.1 Keyboard
All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes
2.4.3 Focus Order – Level A
If a page can be navigated sequentially and the navigation sequences affect meaning or operation, focusable components receive focus in an order that preserves meaning and operability.
2.4.6 Headings and Labels – Level AA
Headings and labels describe topic or purpose.
3.1.1 Language of Page – Level A
The default human language can be programmatically determined.
Relevant WCAG 2.1 Success Criteria for PDFs with fillable forms
The number of success criteria that may apply to your document increases if the PDF includes a fillable form. The following are success criteria relevant to PDF forms.
2.5.2 Pointer Cancellation – Level A
Applicable to PDFs when forms are incorporated. When a “single pointer” is used – for example when checking a checkbox in a form by clicking it with the mouse – pressing down on the mouse button shouldn’t “execute the function” (check the box). Rather, the checkbox should become checked when the user lets go of the mouse button (“mouse up”). Also, there has to be a way to “abort the function” (not check the box) or to undo it after it’s been checked.
2.5.3 Label in Name – Level A
When creating forms, make sure that the visible label (for the question) matches, as closely as possible, the tooltip that will be read by assistive technologies. Also, make sure that the “name” of the form field matches the question. For example, if the question is “What’s your age?” then the name for the form annotation should be “age.”
3.3.2 Labels or Instructions – Level A
Labels or instructions are provided when content requires user input.
How to Resolve a Link to PDF Warning
What to do (in short)
To resolve a Link to PDF warning, you need to follow these steps:
- Make sure that any PDF documents can be accessed natively.
- If you’re using a WordPress plugin that allows you to embed PDFs on your website, you need to ensure a direct link to view or download the document is also present and that it clearly warns people a PDF is present.
- Ensure the link to the PDF warns users it is a link to a PDF.
- Test and remediate your PDF for accessibility errors.
- After determining your PDF is fully accessible, you can safely “Ignore” the warning in the Accessibility Checker.
How to find PDFs links in your WordPress posts and pages
First, install the free Accessibility Checker WordPress plugin.
For any pages or posts that have the Link to PDF warning in the WordPress editor, you can open the details tab in the Accessibility Checker meta box, then expand the Link to PDF warning to see a list of code that caused the warning to appear.
In the screenshot above there is one link flagged that is linking to a PDF file. This code for this link looks like this:
<a href="https://demosite.equalizedigital.com/wp-content/uploads/2020/11/accessible-pdf-example.pdf" class="pdfemb-viewer" style="" data-width="max" data-height="max" data-toolbar="bottom" data-toolbar-fixed="on">accessible-pdf-example<br/></a>
Depending upon how you are editing your website content, on the backend of your website this may appear as a link in the content, within a shortcode, or in a PDF embed block. Generally, you can look at the file URL (in this instance, accessible-pdf-example.pdf) for a hint if you need help finding the PDF that is being linked to.
In this particular example, there is also a visible class (class="pdfemb-viewer"
) that tells us the PDF is being added as an embed with a specific plugin. If this were your website, this should be a red flag that you need to manually accessibility test the live version of this page to make sure that the embed is not causing any issues that also need to be remedied in addition to testing the PDF itself for accessibility.
Before remediation: ask if a PDF is really necessary
The first general guideline with regard to accessibility and PDFs is to not use PDFs in the first place.
If possible, avoid posting content or information in a PDF format at all. The best, most accessible way to add information or resources to your website is to add them within the WordPress editor as native web content available on the website rather than in a separate document. Ask yourself:
- Can a PDF form be built, instead, with your form plugin? There are options for outputting web form entries into PDF format.
- Can information for an upcoming event be added directly onto your event calendar?
- Can the text from a monthly newsletter or annual report be copy/pasted into a blog post?
Posting a PDF document may be appropriate when it is necessary to retain printer styling. Even so, it is usually best to either provide the full content in HTML format also or, at a minimum, provide a summary of the content in HTML format. If you can avoid using a PDF, that is almost always the best choice and will save you time in having to test for and remediate accessibility issues in your PDF.
Software programs to test and create accessible PDFs
If a PDF is the right choice for your needs, there are several options available to create accessible PDFs or test to see if an existing PDF is accessible. Here are a few to consider:
- Adobe Acrobat Pro is an application that creates and edits PDF files. It can evaluate and repair PDF files through its built-in accessibility checker. It provides access to the structure root through the tags panel, the ability to manipulate reading order through the order panel, and tools which provides a graphical mechanism for assessing and repairing the accessibility of a PDF document.
- CommonLook PDF Validator from Netcentric Technologies is a free plug-in for Adobe Acrobat Pro. CommonLook helps identify, report and correct the most common accessibility problems, including the proper tagging of images, tables, forms and other non-textual objects. We have found CoomonLook to be more thorough at identifying issues in PDFs than Adobe.
- PAVE-PDF is a free, open-source online accessibility checker developed by the Zurich University of Applied Sciences (ZHAW) in collaboration with the Swiss Federation of the Blind and Visually Impaired. PAVE identifies areas needing improvement and allows uses to make changes within the application, save, and download. This may be an ideal and affordable tool if you have only a few PDFs needing an accessibility review.
Basic principles of PDF accessibility
In order to be accessible, a PDF must be scannable, searchable, legible, and readable. The University of Minnesota has a great explanation of these core components of PDF accessibility:
- Scannable: Readers can quickly scan a document to find out what it contains.
- Searchable: Readers can use a digital device to search for words in the document.
- Legible: Sighted readers can physically read the text.
- Readable: Readers can easily understand the messages in the document.
Checklist for PDF accessibility
When testing a PDF for accessibility, the following items are things that you want to test and confirm:
Prechecks
These items apply if you are testing for accessibility in Adobe Acrobat Pro.
- Page Content error for “Scripts – Needs manual check” is not present. (If it is you likely need to hire an experienced tester.)
- Advanced Document Properties displays “Tagged PDF: Yes” – if the document is not tagged then it needs to be rebuilt as a tagged document prior to testing.
- Run the Accessibility Full Check ( View > Tools > Accessibility >Full Check > Start Checking) and expand the “Document” category to confirm that the PDF is not an image and does not contain scanned pages. (You do not want to see “Image-only PDF – Failed”)
Document Properties
- The PDF has a descriptive file name.
- The filename identifies the document or its purpose.
- Initial View is set to show “Document Title”.
- Assistive Technology access is enabled and Content Copying for Accessibility” displays “Allowed”.
- The correct document language displays under Advanced > Reading Options.
- Alternate versions, in the case of providing a version with a lower reading level or different language, are equivalent and up to date.
Structure Tags
- All meaningful content is tagged content.
- The tags follow the visual/logical order of the document.
- All decorative content (text and objects) show as “Artifact”.
- Vital information in headers, footers, and watermarks is duplicated in the text as tagged content.
- Heading tags match document headings and follow the visual outline.
- Lists have a parent tag and have one or more nested list item tags.
- Sections in different languages have a corresponding language attribute. The tag shows the selection’s language or corresponding two-letter code.
Objects
- All “Figures” have alternative text that describes its purpose/function.
- All captions describe the purpose/function of associated images/objects.
- Descriptive text convey the purpose and/or function of the image/object.
- Meaning of color or other sensory characteristics is duplicated in text.
- Text and Large Text (including images of text) pass with the Color Contrast Analyzer
- Data tables
- Tables are identified with a “Table” tag.
- Table header cells have a “TH” tag and data cells have a “TD” tag.
- Row/column span match the layout, and cells have scope and unique IDs.
- Data cells are associated with corresponding header cells.
- Links
- Link names describe destination/purpose or describe context
- Links have unique names.
- Tab order matches the visual/logical order of interactive elements
- Fillable forms
- Each form field has a tooltip that matches the label or instruction.
- Tab order matches the visual/logical order of form fields.
- Media
- Any audio-only objects embedded in the PDF have a transcript that is accurate and complete.
- Any video-only objects have a text description that is accurate and complete.
- Multimedia (combined audio/video) have synchronized captions and audio description that are accurate and complete.
- Flashing objects are excluded from the document.
Warn users when linking to a PDF document
After your PDF is fully accessible and when you are ready to link to it, you want to make sure that the anchor text in the link to the PDF warns users that they are opening a PDF if they click on the link. This is especially important for blind and visually impaired users who may be confused about what happened if a file downloads when they expect to be redirected to a new web page, especially if the file opens in a new browser tab or window.
The easiest way to warn people that a link will open or download a file is to append the file extension in the visible text of the link like this:
<a href="https://website.com/brochure.pdf">Download our Brochure (PDF)</a>
This will alert both sighted and screen reader users that the link goes to a PDF rather than a webpage.
What if I can’t remediate my PDF?
If you are not sure how to remediate your PDF or don’t have the time to do so, there are two options:
- hire a PDF accessibility expert like Equalize Digital to make your PDF accessible, or
- remove the document from the website.
There have been lawsuits that specifically included PDF accessibility in addition to website accessibility. If you have a large number of PDFs or are in certain industries, it may be better to remove in accessible PDFs from your website and either replace them with HTML content visible on a page or post, or to just note that the document is available upon request (at which point you can determine which accessibility features the requester might need).
Additional PDF accessibility resources
Here are some additional resources for learning about PDF accessibility: