Display Techniques for EPUB Accessibility Metadata 2.0

Draft Community Group Report

This version:
https://w3c.github.io/publ-a11y/a11y-meta-display-guide/2.0/techniques/epub-metadata/epub-metadata-draft-note-20241101.html
Latest published version:
https://www.w3.org/publishing/a11y/UX-Guide-metadata/techniques/epub-metadata/
Latest editor's draft:
https://w3c.github.io/publ-a11y/a11y-meta-display-guide/2.0/draft/techniques/epub-metadata/
Editor:
Charles LaPierre (Benetech)
Feedback:
GitHub w3c/publ-a11y (pull requests, new issue, open issues)

Abstract

Status of This Document

This specification was published by the Publishing Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups.

GitHub Issues are preferred for discussion of this specification.

1. EPUB Accessibility Metadata

This metadata as outlined in EPUB Accessibility 1.1 [epub-a11y-11], can be found in the EPUB package document [EPUB-33].

Note
Note
Note

1.1 EPUB Accessibility Metadata Examples

1.1.1 EPUB accessibility metadata describing an EPUB

Here is an example of accessibility metadata embedded within the package document, which will be used as a reference point for the following examples on EPUB accessibility metadata: the results of the XPath shown are based on this example.

1.1.2 EPUB accessibility metadata describing an audiobook

Here is an example of an accessibility OPF Metadata for describing an audiobook, which will be used as a reference point for the following examples on EPUB accessibility metadata: the results of the XPath shown are based on this example.

2. Conventions for implementations

The code conventions used in the provided code snippet follow a structure commonly found in programming languages like Python, Java, or C++. Here's an explanation of the conventions:

Conditionals and Control Flow:
IF, ELSE IF, and ELSE (in bold and capital letters) statements are used to define different conditions and the corresponding actions to be taken.
Operators:
Written operators (is present) are used to check if a particular code or codelist is present (or not) in the metadata record.
Logical operators:
Logical operators (AND, OR, NOT, in bold and capital letters) are used to combine conditions.
String Literals:
String literals are used to represent the text that should be displayed when a particular condition is met.
Variable Naming:
The terms like "property" and "value" are used in a way that suggests a variable or data structure representing the metadata record.
Indentation:
The code uses consistent indentation to define blocks of code within conditional statements. This is crucial for readability and maintaining a clear structure.
Readability:
The code is written in a way that is intended to be easily readable and understandable even by non-coders.

3. Common Functions

In this section we define the functions common to all techniques, which are called by them during execution.

3.1 Preprocessing

Before working directly with the metadata we must read the metadata in the Package document (package document) inside the EPUB. This is a common starting point for all techniques that allows us to query the metadata directly.

Note

This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.

To generate the internal representation, run the following steps:

  1. LET package_document_content be textual representation of the Package document for the publication given package_document_as_text.
  2. LET package_document be the DOM tree that results from parsing package_document_content using an XML DOM parser.
  3. Return package_document.

3.2 Check for Node

Many of the techniques rely on checking for the presence or absence of metadata in the metadata section of the Package document.

Note

This algorithm takes:

To check for node, run the following steps:

  1. IF package_document contains path: THEN return True.
  2. ELSE return False.

3.3 Join array to comma list

This function serves to concatenate an array of strings, separating each element with a comma, with the last element separated by an ", and" (this string is localizable).

For example if the input array has elements ["one", "two", "three"], then the output is going to be "one, two, and three".

This algorithm takes the string_array argument: the list of string to join.

To join the array, run the following steps:

  1. LET output_string be the result of:
    • calling join on string_array with the separator ", "
    • replacing the last occurrence of ", " with ", and ".
  2. return output_string.

4. Techniques

4.1 Visual adjustments

This technique relates to Visual adjustments key information.

This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.

4.1.1 Understanding the variables

all_textual_content_can_be_modified

If true it indicates that the accessibilityFeature="displayTransformability" (All textual content can be modified) is present in the package document, otherwise if false it means that the metadata is not present.

All textual content can be modified means that the digital publication does not restrict the ability of users to modify and reflow the display of any textual content to the full extent allowed by the reading system (i.e. to change the text size or typeface, line height and word spacing, colors).

is_fixed_layout

If true it indicates that the layout="pre-paginated" (Fixed format) is present in the package document, otherwise if false it means that the metadata is not present.

Fixed format means that digital publication is in fixed format (e.g. EPUB Fixed Layout).

4.1.2 Variables setup

  1. LET package_document be the result of calling preprocessing given package_document_as_text.
  2. LET all_textual_content_can_be_modified be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="displayTransformability"].
  3. LET is_fixed_layout be the result of calling check for node on package_document, /package/metadata/meta[@property="rendition:layout" and text()="pre-paginated"].

4.1.3 Instructions

  1. Display "Visual adjustments" as heading.
  2. IF all_textual_content_can_be_modified: THEN display "Appearance can be modified".
  3. ELSE IF is_fixed_layout: THEN display "Appearance cannot be modified".
  4. ELSE display "Appearance modifiability not known".

4.2 Supports nonvisual reading

This technique relates to Supports nonvisual reading key information.

This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.

4.2.1 Understanding the variables

all_necessary_content_textual

If true it indicates that the accessModeSufficient="textual" (all main content is provided in textual form) is present in the package document, otherwise if false it means that the metadata is not present.

All non-decorative content supports reading without sight means that all contents of the digital publication necessary to use and understanding, including text, images (via their alternative descriptions), audio and video material (via their transcripts, descriptions, captions or subtitles) are fully accessible via suitable reading devices, for example text-to-speech screen readers or tactile reading devices (‘Braille displays’), and nothing in the digital publication prevents or blocks the use of alternative reading modes. The entire publication can be navigated and ‘read’ using only text rendered via sound or touch, and does not require visual perception.

non_textual_content_images

If true it indicates that at least one of the following is present in the package document:

  • accessMode="chartOnVisual" (Charts and Graphs);
  • accessMode="chemOnVisual" (Chemistry);
  • accessMode="diagramOnVisual" (Diagrams);
  • accessMode="mathOnVisual" (Math);
  • accessMode="musicOnVisual" (Music);
  • accessMode="textOnVisual" (Images of text);
  • otherwise if false it means that this metadata is not present.

This means that the content contains images of any type.

textual_alternative_images

If true it indicates that at least one of the following is present in the package document:

  • accessibilityFeature="alternativeText" (Short alternative textual descriptions);
  • accessibilityFeature="longDescription" (Full alternative textual descriptions);
  • accessibilityFeature="describedMath" (Visual of math fully described));
  • otherwise if false it means that this metadata is not present.

This means that there are textual alternatives for images.

4.2.2 Variables setup

  1. LET package_document be the result of calling preprocessing given package_document_as_text.
  2. LET all_necessary_content_textual be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessModeSufficient" and text()="textual"].
  3. LET non_textual_content_images be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and
    (text()="chartOnVisual" or text()="chemOnVisual" or
    text()="diagramOnVisual" or text()="mathOnVisual" or
    text()="musicOnVisual" or text()="textOnVisual")]
    .
  4. LET textual_alternative_images be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and
    (text()="longDescription" or text()="alternativeText" or text()="describedMath")]
    .

4.2.3 Instructions

  1. Display "Supports nonvisual reading" as heading.
  2. IF all_necessary_content_textual: THEN display "Readable in read aloud and braille".
  3. ELSE IF non_textual_content_images AND NOT textual_alternative_images: THEN display "Not fully readable in read aloud and braille".
  4. ELSE display "May not be fully readable in read aloud and braille".

4.3 Conformance

This technique relates to Conformance key information.

This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.

4.3.1 Understanding the variables

epub_accessibility_1_0

If true it indicates that the conformsTo="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-a" (EPUB Accessibility Specification 1.0 A) or the conformsTo="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa" (EPUB Accessibility Specification 1.0 AA) or the conformsTo="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aaa" (EPUB Accessibility Specification 1.0 AAA) is present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication conforms with either the requirements of EPUB Accessibility Spec 1.0, at level A, AA, or AAA.

epub_accessibility_1_1

If true it indicates that the conformsTo contains "EPUB Accessibility 1.1" (EPUB Accessibility Specification 1.1) is present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication conforms with the requirements of EPUB Accessibility Spec 1.1.

wcag_20

If true it indicates that the conformsTo contains "WCAG 2.0" or conformsTo="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-a" (EPUB Accessibility Specification 1.0 A) or the conformsTo="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa" (EPUB Accessibility Specification 1.0 AA) or the conformsTo="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aaa" (EPUB Accessibility Specification 1.0 AAA) are present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication conforms with the requirements of WCAG version 2.0 or with the requirements of EPUB Accessibility Spec 1.0 (at level A, AA, or AAA). This is because being compliant with EPUB Accessibility 1.0 specification means at least being compliant with WCAG 2.0 specification.

wcag_21

If true it indicates that the conformsTo contains "WCAG 2.1" is present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication conforms with the requirements of WCAG version 2.1.

wcag_22

If true it indicates that the conformsTo contains "WCAG 2.2" is present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication conforms with the requirements of WCAG version 2.2.

level_a

If true it indicates that the conformsTo contains "Level A" or the conformsTo="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-a" (EPUB Accessibility Specification 1.0 A) are present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication conforms with the requirements of WCAG level A or with the requirements of EPUB Accessibility Spec 1.0 level A.

level_aa

If true it indicates that the conformsTo contains "Level AA" or the conformsTo="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa" (EPUB Accessibility Specification 1.0 AA) are present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication conforms with the requirements of WCAG level AA or with the requirements of EPUB Accessibility Spec 1.0 level AA.

level_aaa

If true it indicates that the conformsTo contains "Level AAA" or the conformsTo="http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aaa" (EPUB Accessibility Specification 1.0 A) are present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication conforms with the requirements of WCAG level AAA or with the requirements of EPUB Accessibility Spec 1.0 level AAA.

certifier

Returns the description of a11y:certifiedBy (Compliance certification by (name)) if present in the package document, otherwise if false it means that the metadata is not present.

This means that the name of the organization responsible for compliance testing and certification of the product is present.

certifier_credentials

Returns the description of a11y:certifierCredential (Compliance certification by (URL)) if present in the package document, otherwise if false it means that the metadata is not present.

This means that the the URL of a web page belonging to an organization responsible for compliance testing and certification of the product is present – typically a ‘home page’ or a page describing the certification scheme itself.

certification_date

Returns the description of dcterms:date if that date property is associated with the a11y:certifiedBy (Latest accessibility assessment date) if present in the package document, otherwise if false it means that the metadata is not present.

This means that the date of the latest assessment or re-assessment of the accessibility of the product is present.

certifier_report

Returns the description of a11y:certifierReport (Compliance web page for detailed accessibility information) if present in the OPF, otherwise if false it means that the metadata is not present.

This means that is present the URL of a compliance web page for detailed accessibility information. The web page should be maintained by an independent compliance scheme or testing organization. Note the web page may include information about specific national requirements or voluntary conformance reports.

conformance-claimed

If true it indicates that the conformsTo is present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication conforms to some specification.

4.3.2 Variables setup

  1. LET package_document be the result of calling preprocessing given package_document_as_text.
  2. LET epub_accessibility_1_0 be the result of calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and contains(text(), http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-"].
  3. LET epub_accessibility_1_1 be the result of calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and contains(text(), "EPUB Accessibility 1.1")].
  4. LET wcag_20 be the result of calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and contains(text(), "http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-")] OR calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and contains(text(), "WCAG 2.0")]
  5. LET wcag_21 be the result of calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and contains(text(), WCAG 2.1")].
  6. LET wcag_22 be the result of calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and contains(text(), WCAG 2.2")].
  7. LET level_a be the result of calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and contains(text(), Level A")] OR calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and text()=http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-a"].
  8. LET level_aa be the result of calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and contains(text(), Level AA")] OR calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and text()=http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa"].
  9. LET level_aaa be the result of calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and contains(text(), Level AAA")] OR calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo" and text()=http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aaa"].
  10. LET certifier be the value of the node extracted from package_document, using the xpath /package/metadata/meta[@property="a11y:certifiedBy"]/text().
  11. LET certifier_credentials be the value of the node extracted from package_document, using the xpath /package/metadata/meta[@property="a11y:certifierCredential"]/text().
  12. LET certification_date be the value of the node extracted from package_document, using the xpath /package/metadata/meta[@property="dcterms:date" and @refines=//meta[@property="a11y:certifiedBy"]/@id]/text()].
  13. LET certifier_report be the value of the node extracted from package_document, using the xpath /package/metadata/meta[@property="a11y:certifierReport"]/text()].
  14. LET conformance_claimed be the result of calling check for node on package_document, /package/metadata/meta[@property="dcterms:conformsTo"].

4.3.3 Instructions

  1. Display "Conformance" as heading.
  2. IF level_aaa: THEN display "This publication exceeds accepted accessibility standards".
  3. ELSE IF level_aa: THEN display "This publication meets accepted accessibility standards".
  4. ELSE IF level_a: THEN display "This publication meets minimum accessibility standards".
  5. ELSE IF conformance_claimed: THEN display "Conformance to accepted standards for accessibility of this publication cannot be determined".
  6. ELSE: THEN display "The publication does not include a conformance statement".
  7. IF certifier is NOT empty: THEN
    • display "This publication is certified by "
    • display certifier.
  8. IF certifier_credentials is NOT empty: THEN
    • display "The certifier's credential is "
    • display certifier_credentials as link IF certifier_credentials is an URL.
  9. display "Detailed Conformance Information" as heading.
  10. IF epub_accessibility_1_0 OR epub_accessibility_1_1 OR wcag_20 OR wcag_21 OR wcag_22 OR level_aaa OR level_aa OR level_a: THEN display "This publication claims to meet ".
  11. IF epub_accessibility_1_0: THEN display " EPUB Accessibility 1.0 ".
  12. ELSE IF epub_accessibility_1_1: THEN display " EPUB Accessibility 1.1 ".
  13. IF wcag_22: THEN display " WCAG 2.2 ".
  14. ELSE IF wcag_21: THEN display " WCAG 2.1 ".
  15. ELSE IF wcag_20: THEN display " WCAG 2.0 ".
  16. IF level_aaa: THEN display " Level AAA".
  17. ELSE IF level_aa: THEN display " Level AA".
  18. ELSE IF level_a: THEN display " Level A".
  19. IF certification_date OR certifier OR certifier_credentials: THEN display "The publication was certified ".
  20. IF certification_date: THEN
    • display " on "
    • display certification_date.
  21. IF certifier: THEN
    • display " by "
    • display certifier.
  22. IF certifier_credentials: THEN
    • display " with a credential of "
    • display certifier_credentials as link IF certifier_credentials is an URL.
  23. IF certifier_report: THEN
    • display "For more information refer to the certifier's report"
    • with certifier_report as link.

4.4 Pre-recorded audio

This technique relates to Pre-recorded audio key information.

This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.

4.4.1 Understanding the variables

all_content_audio

If true it indicates that the accessModeSufficient="auditory" (all main content is provided in audio form) is present in the package document, otherwise if false it means that the metadata is not present.

synchronised_pre_recorded_audio

If true it indicates that the accessibilityFeature="sychronizedAudioText" is present in the package document, otherwise, if false, it means that the metadata is not present.

This indicates that text-synchronised pre-recorded audio narration (natural or synthesised voice) is included for substantially all textual matter, including all alternative descriptions, e.g. via a SMIL media overlay.

audio_content

If true it indicates that the accessMode="auditory" is present in the package document, otherwise, if false, it means that the metadata is not present.

This indicates that pre-recorded audio content is included as part of the work.

4.4.2 Variables setup

  1. LET package_document be the result of calling preprocessing given package_document_as_text.
  2. LET all_content_audio be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessModeSufficient" and text()="auditory"].
  3. LET synchronised_pre_recorded_audio be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="sychronizedAudioText"].
  4. LET audio_content be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessMode" and text()="auditory"].

4.4.3 Instructions

  1. Display "Pre-recorded audio" as heading.
    Note

    This heading can be hidden if metadata is missing.

  2. IF all_content_audio: THEN display "Audio only".
  3. ELSE IF synchronised_pre_recorded_audio: THEN display "Synchronized audio and text".
  4. ELSE IF audio_content: THEN display "Complementary audio and text".
  5. ELSE either omit this key informtion if metadata is missing or display "No information about pre-recorded audio is available.".

4.6 Charts, diagrams, math, and formulas

This technique relates to Charts, diagrams, math, and formulas key information.

This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.

4.6.1 Understanding the variables

contains_charts_diagrams

If true it indicates that the accessibilityFeature="chartOnVisual" (charts encoded in visual form) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication that the product has some information conveyed via some form of illustration, such as a graph, a chart, a diagram, a figure, etc).

long_text_descriptions

If true it indicates that the accessibilityFeature="longDescriptions" (Full alternative textual description) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication that a full alternative textual description has been supplied for all of the graphs, charts, diagrams, or figures necessary to understand the content.

contains_chemical_formula

If true it indicates that the accessibilityFeature="chemOnVisual" (Chemical content) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication that the publication contains chemical notations, formulae.

chemical_formula_as_chemml

If true it indicates that the accessibilityFeature="ChemML" (Accessible chemistry content as ChemML) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication that the chemical formulae are presented using ChemML and works with compatible assistive technology.

contains_math_formula

If true it indicates that the accessibilityFeature="describedMath" (Mathematical content) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication that the publication contains mathematical notation, equations, formulae.

math_formula_as_latex

If true it indicates that the accessibilityFeature="latex" (Accessible math content as LaTeX) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication that the math is presented using LaTeX and works with compatible assistive technology.

math_formula_as_mathml

If true it indicates that the accessibilityFeature="MathML" (Accessible math content as MathML) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication that all mathematical content is presented using MathML and works with compatible assistive technology.

4.6.2 Variables setup

  1. LET package_document be the result of calling preprocessing given package_document_as_text.
  2. LET contains_charts_diagrams be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="chartOnVisual"].
  3. LET long_text_descriptions be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="longDescriptions"].
  4. LET contains_chemical_formula be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="chemOnVisual"].
  5. LET chemical_formula_as_chemml be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="ChemML"].
  6. LET contains_math_formula be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="describedMath"].
  7. LET math_formula_as_latex be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="latex"].
  8. LET math_formula_as_mathml be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="MathML"].

4.6.3 Instructions

  1. Display "Charts, diagrams, math, and formulas" as heading.
    Note

    This heading can be hidden if metadata is missing.

  2. IF (contains_charts_diagrams AND long_text_descriptions): THEN display "Charts and diagrams have extended descriptions".
  3. IF chemical_formula_as_chemml: THEN display "Accessible chemistry content".
  4. IF math_formula_as_latex OR math_formula_as_mathml: THEN display "Accessible math content".
  5. IF (contains_charts_diagrams OR contains_chemical_formula OR contains_math_formula) AND NOT (long_text_descriptions OR chemical_formula_as_chemml OR math_formula_as_latex OR math_formula_as_mathml): THEN display "accessibility of formulas, charts, math, and diagrams not identified as being accessible".

4.7 Hazards

This technique relates to Hazards key information.

This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.

4.7.1 Understanding the variables

no_hazards_or_warnings_confirmed

If true it indicates that the accessibilityHazard="none" (no accessibility hazards) is present in the package document, otherwise if false it means that the metadata is not present.

This means there is a positive indication in the accessiblity metadata within the EPUB confirming there are no associated hazard warnings with this product.

flashing_hazard

If true it indicates that the accessibilityHazard="flashing" (WARNING - Flashing hazards) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication in the accessiblity metadata within the EPUB confirming that the product has a flashing hazard which must be displayed.

no_flashing_hazards

If true it indicates that the accessibilityHazard="noFlashingHazard" (No flashing hazard warning necessary) is present in the package document, otherwise if false it means that the metadata is not present.

This means there is a positive indication in the accessiblity metadata within the EPUB confirming there are no flashing hazards associated with this product.

motion_simulation_hazard

If true it indicates that the accessibilityHazard="motionSimulation" (WARNING - Motion simulation hazard) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication in the accessiblity metadata within the EPUB confirming that the product has a motion simulation hazard which must be displayed.

no_motion_hazards

If true it indicates that the accessibilityHazard="noMotionSimulationHazard" (No motion simulation hazard warning necessary) is present in the package document, otherwise if false it means that the metadata is not present.

This means there is a positive indication in the accessiblity metadata within the EPUB confirming there are no motion simulation hazards associated with this product.

sound_hazard

If true it indicates that the accessibilityHazard="Sound" (WARNING - Sound hazard) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is a positive indication in the accessiblity metadata within the EPUB confirming that the product has a sound hazard which must be displayed.

no_sound_hazards

If true it indicates that the accessibilityHazard="noSoundHazard" (No sound hazard warning necessary) is present in the package document, otherwise if false it means that the metadata is not present.

This means there is a positive indication in the accessiblity metadata within the EPUB confirming there are no sound hazards associated with this product.

unknown_if_contains_hazards

If true it indicates that the accessibilityHazard="unknown" (unknown hazards) is present in the package document, otherwise if false it means that the metadata is not present.

This means that the product has not been assessed for hazards and there is no information about potential hazards.

4.7.2 Variables setup

  1. LET package_document be the result of calling preprocessing given package_document_as_text.
  2. LET no_hazards_or_warnings_confirmed be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityHazard" and text()="none"].
  3. LET flashing_hazard be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityHazard" and text()="flashing"].
  4. LET no_flashing_hazards be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityHazard" and text()="noFlashingHazard"].
  5. LET motion_simulation_hazard be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityHazard" and text()="motionSimulation"].
  6. LET no_motion_hazards be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityHazard" and text()="noMotionSimulation"].
  7. LET sound_hazard be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityHazard" and text()="sound"].
  8. LET no_sound_hazards be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityHazard" and text()="noSoundHazard"].
  9. LET unknown_if_contains_hazards be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityHazard" and text()="unknown"].

4.7.3 Instructions

  1. Display "Hazards" as heading.
    Note

    This heading can be hidden if metadata is missing.

  2. IF no_hazards_or_warnings_confirmed OR (no_flashing_hazards AND no_motion_hazards AND no_sound_hazards): THEN display "No hazards".
  3. ELSE IF flashing_hazard OR motion_simulation_hazard OR sound_hazard: THEN LET hazards be an empty array.
    1. IF flashing_hazard: THEN APPEND "flashing" to hazards.
    2. IF motion_simulation_hazard: THEN APPEND "motion simulation" to hazards.
    3. IF sound_hazard: THEN APPEND "sound" to hazards.
    4. LET hazards_string be the result of:
      • calling join array to comma list given hazards
      • uppercasing the first character
      • concatenating " hazards" to the end of the string IF (length of hazards) > 1 ELSE concatenating " hazard" to the end of the string.
    5. display hazards_string.
  4. ELSE IF unknown_if_contains_hazards: THEN display "The presence of hazards is unknown".
  5. ELSE either omit this key informtion if metadata is missing or display "No information about possible hazards is available.".

4.8 Accessibility summary

This technique relates to Accessibility summary key information.

This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.

Note

Being human-written, the accessibility summary will appear in the original language of the publication. Therefore it is necessary to take care of setting up the correct language tag information.

Note

Accessibility summaries were necessary when no systems exposed computed accessibility metadata. With more systems now displaying this information, much of the accessibility summary may be redundant. Publishers should focus on adding information not provided within the computed metadata, such as specifying where in a video file a flashing hazard exists, or noting the reason why they failed to meet WCAG-AA due to color contrast issues in the Appendix.

4.8.1 Understanding the variables

accessibility_summary

If true it indicates that the accessibilitySummary is present in the package document, otherwise if false it means that the metadata is not present.

This means there is a human-written text containing a short explanatory summary of the accessibility of the product or the URL of a web page comprising such a summary. Summarizes the already existent information and may add information that the publisher could not express with the other codes.

lang_attribute_accessibility_summary

Returns the lang attribute of the node containing the accessibility_summary, or the lang attribute of the nearest anchestor.

This is the language code in which the text of the Accessibility summary was written.

language_of_text

Returns the value of nearest "language" (Language of content) if present in the package document, otherwise if false it means that the metadata is not present.

This indicates the main language of the content and therefore the most probable language of accessibility summary.

4.8.2 Variables setup

  1. LET package_document be the result of calling preprocessing given package_document_as_text.
  2. LET accessibility_summary be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilitySummary"].
  3. LET lang_attribute_accessibility_summary be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilitySummary"]/(@lang|ancestor::*/@lang)[last()].
  4. LET language_of_text be the result of calling check for node on package_document, /package/metadata/dc:language[1]/text().

4.8.3 Instructions

  1. Display "Accessibility summary" as heading.
    Note

    This heading can be hidden if metadata is missing.

  2. IF lang_attribute_accessibility_summary is NOT empty: THEN LET language_accessibility_summary be the value of lang_attribute_accessibility_summary.
  3. ELSE LET language_accessibility_summary be the value of language_of_text.
  4. ELSE IF accessibility_summary is NOT empty: THEN display the content of accessibility_summary with language_accessibility_summary as language.
  5. ELSE either omit this key informtion if metadata is missing or display "No accessibility summary is available.".

4.10 Additional accessibility information

This technique relates to Additional accessibility information key information.

This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.

4.10.1 Adaptation

4.10.1.1 Understanding the variables
audio_descriptions

If true it indicates that the accessibilityFeature="audioDescriptions" (Audio Descriptions) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is an audio descriptions track available for video content.

braille

If true it indicates that the accessibilityFeature="braille" (Braille) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is braille available within the publication.

closed_captions

If true it indicates that the accessibilityFeature="closedCaptions" (Closed captions) is present in the package document, otherwise if false it means that the metadata is not present.

This means that the audio content of a video can be seen via closed captions that can be turned on or off by the viewer and which will be a separate file from the video itself.

open_captions

If true it indicates that the accessibilityFeature="openCaptions" (Open captions) is present in the package document, otherwise if false it means that the metadata is not present.

This means that the audio content of a video can be seen via open captions, which means they cannot be turned off and are always visible when the video plays.

tactile_graphic

If true it indicates that the accessibilityFeature="tactileGraphic" (tactile 2D graphic) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is tactile graphic(s) contained within this publication.

tactile_object

If true it indicates that the accessibilityFeature="tactileObject" (tactile 3D object) is present in the package document, otherwise if false it means that the metadata is not present.

This means that there is tactile 3D object(s) contained within this publication.

transcript

If true it indicates that the accessibilityFeature="transcript" (transcript) is present in the package document, otherwise if false it means that the metadata is not present.

This means that a transcript of the audio content of the product is supplied with it.

sign_language

If true it indicates that the accessibilityFeature="signLanguage" (Sign language interpretation) is present in the package document, otherwise if false it means that the metadata is not present.

This means that a full signing of audio content of the product is supplied with the video file.

4.10.1.2 Variables setup
  1. LET package_document be the result of calling preprocessing given package_document_as_text.
  2. LET audio_descriptions be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="audioDescription"].
  3. LET braille be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="braille"].
  4. LET closed_captions be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="closedCaptions"].
  5. LET open_captions be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="openCaptions"].
  6. LET tactile_graphic be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="tactileGraphic"].
  7. LET tactile_object be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="tactileObject"].
  8. LET transcript be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="transcript"].
  9. LET sign_language be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="signLanguage"].
4.10.1.3 Instructions
  1. LET adaptation be an empty array.
  2. IF audio_descriptions: THEN APPEND "audio descriptions" to adaptation.
  3. IF braille: THEN APPEND "braille" to adaptation.
  4. IF closed_captions: THEN APPEND "closed captions" to adaptation.
  5. IF open_captions: THEN APPEND "open captions" to adaptation.
  6. IF tactile_graphic: THEN APPEND "tactile graphic" to adaptation.
  7. IF tactile_object: THEN APPEND "tactile 3D object" to adaptation.
  8. IF transcript: THEN APPEND "transcript" to adaptation.
  9. IF sign_language: THEN APPEND "sign language" to adaptation.
  10. IF adaptation is NOT empty:
    1. LET adaptation_string be the result of:
    2. display adaptation_string.

4.10.2 Clarity

4.10.2.1 Understanding the variables
aria

If true it indicates that the accessibilityFeature="aria" (ARIA roles - semantic markup) is present in the package document, otherwise if false it means that the metadata is not present.

This means that the use of AIRA, including DPUB ARIA is used to improve the semantic markup of the publication.

full_ruby_annotations

If true it indicates that the accessibilityFeature="fullRubyAnnotations" (Full Ruby Annotations) is present in the package document, otherwise if false it means that the metadata is not present.

This means that ruby annotations are attached to every CJK ideographic character in the content. Ruby annotations are used as pronunciation guides for the logographic characters for languages like Chinese or Japanese. They make difficult CJK ideographic characters more accessible.

text_to_speech_hinting

If true it indicates that the accessibilityFeature="ttsMarkup" (Text-to-speech markup provided) is present in the package document, otherwise if false it means that the metadata is not present.

This means that text-to-speech has been optimised through provision of PLS lexicons, SSML or CSS Speech synthesis hints or other speech synthesis markup languages or hinting.

high_contrast_between_foreground_and_background_audio

If true it indicates that the accessibilityFeature="highContrastAudio" (Use of high contrast between foreground and background audio) is present in the package document, otherwise if false it means that the metadata is not present.

This means that foreground audio content (eg voice) is presented with no or low background noise (eg ambient sounds, music), at least 20dB below the level of the foreground, or background noise can be switched off (eg via an alternative audio track). Brief and occasional sound effects may be as loud as foreground voice so long as they are isolated from the foreground.

high_contrast_between_text_and_background

If true it indicates that the accessibilityFeature="highContrastDisplay" (Use of high contrast between text and background color) is present in the package document, otherwise if false it means that the metadata is not present.

This means that body text is presented with a contrast ratio of at least 4.5:1 (or 3:1 for large/heading text).

large_print

If true it indicates that the accessibilityFeature="largePrint" (Large Print) is present in the package document, otherwise if false it means that the metadata is not present.

This means that the e-publication has been formatted to meet large print guidelines.

page_break_markers

If true it indicates that the accessibilityFeature="pageBreakMarkers" (Print-equivalent page numbering) is present in the package document, otherwise if false it means that the metadata is not present.

This means that the publication contains references to the page numbering.

ruby_annotations

If true it indicates that the accessibilityFeature="rubyAnnotations" (Ruby Annotations) is present in the package document, otherwise if false it means that the metadata is not present.

This means that ruby annotations are attached to some but not all CJK ideographic characters in the content.

4.10.2.2 Variables setup
  1. LET package_document be the result of calling preprocessing given package_document_as_text.
  2. LET aria be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="aria"].
  3. LET full_ruby_annotations be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="fullRubyAnnotations"].
  4. LET text_to_speech_hinting be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="ttsMarkup"].
  5. LET high_contrast_between_foreground_and_background_audio be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="highContrastAudio"].
  6. LET high_contrast_between_text_and_background be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="highContrastDisplay"].
  7. LET large_print be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="largePrint"].
  8. LET page_break_markers be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="pageBreakMarkers"].
  9. LET ruby_annotations be the result of calling check for node on package_document, /package/metadata/meta[@property="schema:accessibilityFeature" and text()="rubyAnnotations"].
4.10.2.3 Instructions
  1. LET clarity be an empty array.
  2. IF aria: THEN APPEND "aria" to clarity.
  3. IF full_ruby_annotations: THEN APPEND "full ruby annotations" to clarity.
  4. IF text_to_speech_hinting: THEN APPEND "text-to-speech hinting provided" to clarity.
  5. IF high_contrast_between_foreground_and_background_audio: THEN APPEND "high contrast between foreground and background audio" to clarity.
  6. IF high_contrast_between_text_and_background: THEN APPEND "high contrast between text and background" to clarity.
  7. IF large_print: THEN APPEND "large print" to clarity.
  8. IF page_break_markers: THEN APPEND "page breaks" to clarity.
  9. IF ruby_annotations: THEN APPEND "ruby annotations" to clarity.
  10. IF clarity is NOT empty:
    1. LET clarity_string be the result of:
    2. display clarity_string.

A. Acknowledgements

This section is non-normative.

The leadership and editing contributions of the following individuals were central to producing this guide:

The following members of the Publishing Community Group contributed to the development of this document:

B. References

B.1 Informative references

[EPUB-33]
EPUB 3.3. Ivan Herman; Matt Garrish; Dave Cramer. W3C. 17 October 2024. W3C Recommendation. URL: https://www.w3.org/TR/epub-33/
[epub-a11y-11]
EPUB Accessibility 1.1. George Kerscher; Matt Garrish; Charles LaPierre; Avneesh Singh; Gregorio Pellegrino. W3C. 17 October 2024. W3C Recommendation. URL: https://www.w3.org/TR/epub-a11y-11/