pressbooks / pressbooks-book

McLuhan is the default book theme for Pressbooks.
https://pressbooks.org
GNU General Public License v3.0
20 stars 16 forks source link

Footnotes fail the list item label and list item body tag tests for accessibility in digital PDF #664

Open mcgratay opened 4 years ago

mcgratay commented 4 years ago

Description

The PDF accessibility guidelines set out in the Adobe Acrobat User Guide state that

Lists must have the following structure: A List element must contain List Item Elements. And, List Item Elements can only contain Label Elements and List Item Body Elements. When this rule check fails, the structure of this list is incorrect.

While created via the visual editor tools for ordered and unordered lists do pass this requirement, lists created automatically via the Footnotes feature do not. The Adobe accessibility checker flags footnotes as LBL and LBody errors.

Screen Shot 2020-02-05 at 16 36 49

View the Adobe User Guide: https://helpx.adobe.com/acrobat/using/create-verify-pdf-accessibility.html?trackingid=KACNN#LblLBody

Steps to Reproduce

  1. Download Adobe Acrobat Pro
  2. Create a new chapter in your test book in Pressbooks
  3. Add dummy text, then insert a footnote somewhere in the text and save
  4. Export to digital PDF
  5. Open in Adobe, then activate the accessibility checker to view whether the footnote passes or fails accessibility requirements

Expected behavior: Digital PDFs meet all known accessibility requirements

Actual behavior: Footnotes currently fail accessibility checks in the PDF format.

SteelWagstaff commented 4 years ago

Our footnote routine produces <li> elements that contain footnote content and a elements: https://github.com/pressbooks/pressbooks/blob/92bb307be76a5ee20a88e246459cac4b30403fce/inc/shortcodes/footnotes/class-footnotes.php#L147. Apparently, creating accessible lists requires different tag structure for PDFs than are expected for HTML.

The PDF specification defines list structure in section 14.8.4.3.3 (List Elements). The structure types for lists in PDF documents are: L - the List tag, which contains one or more LI tags. LI - the List Item tag. List item tags can contain Lbl and LBody tags. Lbl - the list item label. Contains distinguishing information such as a item number or bullet character. LBody - the list item body. Contains list item content, or in the case of a nested list, it may contain additional List tag trees. Source: https://www.w3.org/TR/WCAG20-TECHS/PDF21.html

See also: Screenshot from 2020-06-20 18-40-21

Source: https://www.w3.org/TR/WCAG20-TECHS/PDF21.html

See also https://medium.com/@bruce_39084/making-accessible-tagged-pdfs-with-prince-ad7fd7a48711

ricardopressbooks commented 4 years ago

Prince creates Footnotes with the following structure:

Reference
    Lbl
        [footnote call]
Note
    Lbl
        [footnote marker]
    [footnote body]

There isn't enough information about rules for References with a Lbl. I wrote to the Prince forums to get more related help:https://www.princexml.com/forum/topic/4454/accessibility-in-footnotes?p=1#22288 They will review the Footnotes structure.

@SteelWagstaff in short term I can see 2 options for this task:

I would recommend wait for a official solution.

tw77 commented 1 year ago

Interest in a solution for this expressed by Penn State (for PB internal reference: https://pressbooks.zendesk.com/agent/tickets/13978)