This metadata as outlined in the 1.1 Accessibility Specification Conformance and Discoverability can be found in the EPUB Package Document
Here is an example of accessibility metadata embedded within the OPF file, 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.
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.
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:
In this section we define the functions common to all techniques, which are called by them during execution.
Before working directly with the metadata we must read the metadata in the Package document (OPF file) inside the EPUB. This is a common starting point for all techniques that allows us to query the metadata directly.
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:
Many of the techniques rely on checking for the presence or absence of metadata in the metadata section of the Package document.
This algorithm takes:
To check for node, run the following steps:
True
.
False
.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.
If true it indicates that the accessibilityFeature="displayTransformability" (All textual content can be modified) is present in the OPF file, 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).
If true it indicates that the layout="pre-paginated" (Fixed format) is present in the OPF file, 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).
/package/metadata/meta[@property="schema:accessibilityFeature" and text()="displayTransformability"]
./package/metadata/meta[@property="rendition:layout" and text()="pre-paginated"]
.Appearance can be modified"
.
"Appearance cannot be modified"
.
"Appearance modifiability not known"
.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.
If true it indicates that the accessModeSufficient="textual" (all main content is provided in textual form) is present in the OPF file, 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.
If true it indicates that at least one of the following is present in the OPF file:
This means that the content contains images of any type.
If true it indicates that at least one of the following is present in the OPF file:
This means that there are textual alternatives for images.
/package/metadata/meta[@property="schema:accessModeSufficient" and text()="textual"]
./package/metadata/meta[@property="schema:accessibilityFeature" and
(text()="chartOnVisual" or text()="chemOnVisual" or
text()="diagramOnVisual" or text()="mathOnVisual" or
text()="musicOnVisual" or text()="textOnVisual")]
.
/package/metadata/meta[@property="schema:accessibilityFeature" and
(text()="longDescription" or text()="alternativeText" or text()="describedMath")]
.
"Readable in read aloud and braille"
.
"Not fully readable in read aloud and braille"
.
"May not be fully readable in read aloud and braille"
.This technique relates to Conformance key information.
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.
If true it indicates that the accessModeSufficient="auditory" (all main content is provided in audio form) is present in the OPF file, otherwise if false it means that the metadata is not present.
If true it indicates that the accessibilityFeature="sychronizedAudioText" is present in the OPF file, 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.
If true it indicates that the accessMode="auditory" is present in the OPF file, 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.
/package/metadata/meta[@property="schema:accessModeSufficient" and text()="auditory"]
./package/metadata/meta[@property="schema:accessibilityFeature" and text()="sychronizedAudioText"]
./package/metadata/meta[@property="schema:accessMode" and text()="auditory"]
."Audio only"
.
"Synchronized audio and text"
.
"Complementary audio and text"
.
"No information about pre-recorded audio"
.
This key information can be hidden if metadata is missing.
This technique relates to Charts, diagrams, and formulas key information.
This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.
If true it indicates that the accessibilityFeature="chartOnVisual" (charts encoded in visual form) is present in the OPF file, 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).
If true it indicates that the accessibilityFeature="longDescriptions" (Full alternative textual description) is present in the OPF file, 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.
If true it indicates that the accessibilityFeature="chemOnVisual" (Chemical content) is present in the OPF file, 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.
If true it indicates that the accessibilityFeature="ChemML" (Accessible chemistry content as ChemML) is present in the OPF file, 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.
If true it indicates that the accessibilityFeature="describedMath" (Mathematical content) is present in the OPF file, 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.
If true it indicates that the accessibilityFeature="latex" (Accessible math content as LaTeX) is present in the OPF file, 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 LaTeX and works with compatible assistive technology.
If true it indicates that the accessibilityFeature="MathML" (Accessible math content as MathML) is present in the OPF file, 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.
/package/metadata/meta[@property="schema:accessibilityFeature" and text()="chartOnVisual"]
./package/metadata/meta[@property="schema:accessibilityFeature" and text()="longDescriptions"]
./package/metadata/meta[@property="schema:accessibilityFeature" and text()="chemOnVisual"]
./package/metadata/meta[@property="schema:accessibilityFeature" and text()="ChemML"]
./package/metadata/meta[@property="schema:accessibilityFeature" and text()="describedMath"]
./package/metadata/meta[@property="schema:accessibilityFeature" and text()="latex"]
./package/metadata/meta[@property="schema:accessibilityFeature" and text()="MathML"]
."Charts and diagrams have extended descriptions"
.
"Accessible chemistry content"
.
"Accessible math content"
.
"Accessibility of formulas, charts, and diagrams unknown"
.
This technique relates to Hazards key information.
This algorithm takes the package_document_as_text argument: a UTF-8 string representing the Package document.
If true it indicates that the accessibilityHazard="none" (no accessibility hazards) is present in the OPF file, 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.
If true it indicates that the accessibilityHazard="flashing" (WARNING - Flashing hazards) is present in the OPF file, 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.
If true it indicates that the accessibilityHazard="noFlashingHazard" (No flashing hazard warning necessary) is present in the OPF file, 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.
If true it indicates that the accessibilityHazard="motionSimulation" (WARNING - Motion simulation hazard) is present in the OPF file, 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.
If true it indicates that the accessibilityHazard="noMotionSimulationHazard" (No motion simulation hazard warning necessary) is present in the OPF file, 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.
If true it indicates that the accessibilityHazard="Sound" (WARNING - Sound hazard) is present in the OPF file, 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.
If true it indicates that the accessibilityHazard="noSoundHazard" (No sound hazard warning necessary) is present in the OPF file, 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.
If true it indicates that the accessibilityHazard="unknown" (unknown hazards) is present in the OPF file, 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.
/package/metadata/meta[@property="schema:accessibilityHazard" and text()="none"]
./package/metadata/meta[@property="schema:accessibilityHazard" and text()="flashing"]
./package/metadata/meta[@property="schema:accessibilityHazard" and text()="noFlashingHazard"]
./package/metadata/meta[@property="schema:accessibilityHazard" and text()="motionSimulation"]
./package/metadata/meta[@property="schema:accessibilityHazard" and text()="noMotionSimulation"]
./package/metadata/meta[@property="schema:accessibilityHazard" and text()="sound"]
./package/metadata/meta[@property="schema:accessibilityHazard" and text()="noSoundHazard"]
./package/metadata/meta[@property="schema:accessibilityHazard" and text()="unknown"]
."No hazards"
.
"flashing"
to hazards.
"motion"
to hazards.
"sound"
to hazards.
", "
", "
with " and "
" hazards"
to the end of the string IF (length of hazards) > 1 ELSE concatenating " hazard"
to the end of the string."The presence of hazards is unknown"
.
"No information about possible hazards"
.
This key information can be hidden if metadata is missing.
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.
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.
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.
If true it indicates that the accessibilitySummary is present in the OPF file, 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.
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.
Returns the value of nearest "language" (Language of content) if present in the OPF File, 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.
/package/metadata/meta[@property="schema:accessibilitySummary"]
./package/metadata/meta[@property="schema:accessibilitySummary"]/(@lang|ancestor::*/@lang)[last()]
./package/metadata/dc:language[1]/text()
."No accessibility summary"
.
This key information can be hidden if metadata is missing.
This technique relates to Additional accessibility information key information.