ONIX Metadata

Other techniques for implementing EPUB accessibility metadata are available: Display Techniques for Displaying Accessibility Metadata

This document provides techniques for meeting the guidelines of the User Experience Guide for Displaying Accessibility Metadata. It provides practical examples for extracting information from the ONIX metadata for showing it to the end users.

ONIX messages describe products for the global book supply chain and will be sent from publisher or creator of the epub or digital books with full audio to those who will make the products available for sale, lending or subscription. These platforms may not yet have the actual files, as they may not yet be ready, or may only choose to list them for sale if they have certain accessibility features. ONIX also only describes a product, it cannot describe the features of the reading systems on which a product may be accessed. It is important to use ONIX metadata as a complement to the accessibility data embedded within the publication itself, if describing accessible books, books with full audio and related products for the global book supply chain. An ONIX file can be used to display accessibility information in advance of publication or when you do not have access to the metadata in the digital file itself. Some accessibility information may only be available when you have access to the file itself. If you are unfamiliar with ONIX, then there is more documentation available from EDItEUR.org.

It is important to note that ONIX 3.0 includes a number of new accessibility metadata codes, some of which may not be expressible in earlier versions of ONIX.

ONIX record examples

ONIX record describing an EPUB

Here is an example of an ONIX record (version 3.0), 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.

ONIX record describing an audiobook

Here is an example of an ONIX record (version 3.0) for describing an audiobook, which will be used as a reference point for the some of the following examples on EPUB accessibility metadata: the results of the XPath shown are based on this example.

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 "codelist" and "code" are used in a way that suggests a variable or data structure representing a code or codelist to be accessed directly after the ingestion of 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.

Common Functions

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

Pre Processing

Before working directly with the metadata we must read the ONIX record. This is a common starting point for all techniques that allows us to query the record directly.

This algorithm takes the onix_record_as_text argument: a UTF-8 string representing the ONIX record.

To generate the internal representation, run the following steps:

  1. LET record be textual representation of the ONIX record for the publication given onix_record_as_text.
  2. LET onix be the DOM tree that results from parsing record using an XML DOM parser.
  3. Return onix.

Check for Node

Many of the techniques rely on checking for the presence or absence of metadata in the ONIX record.

This algorithm takes:

To check for node, run the following steps:

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

Techniques

Supports nonvisual reading

This technique relates to Supports nonvisual reading key information.

Pre-recorded audio

This technique relates to Pre-recorded audio key information.

Visual adjustments

This technique relates to Visual adjustments key information.

This algorithm takes the onix_record_as_text argument: a UTF-8 string representing the ONIX record.

Understanding the variables

all_textual_content_can_be_modified

If true it indicates that the code 36 of codelist 196 (All textual content can be modified) is present in the ONIX record, 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).

real_text

If true it indicates that the code 10 of codelist 81 (Text) is present in the ONIX record, otherwise if false it means that the metadata is not present.

Text means that digital publication contains "real" text (user-selectable) as its main content (or as secondary content).

text_within_images

If true it indicates that the code 45 of codelist 81 (Text within images) is present in the ONIX record, otherwise if false it means that the metadata is not present.

Text within images means that digital publication contains text within images (i.e. text in diagrams, charts or balloons on which the user will not be able to change the display settings) as its main content (or as secondary content).

images_of_text

If true it indicates that the code 49 of codelist 81 (Images of text) is present in the ONIX record, otherwise if false it means that the metadata is not present.

Images of text means that digital publication contains images of text (i.e. pictures of text on which the user will not be able to change the display settings) as its main content (or as secondary content).

Variables setup

  1. LET onix be the result of calling pre processing given onix_record_as_text.
  2. LET all_textual_content_can_be_modified be the result of calling check for node on onix, /ONIXMessage/Product/DescriptiveDetail/ProductFormFeature[ProductFormFeatureType = "09" and ProductFormFeatureValue = "36"].
  3. LET real_text be the result of calling check for node on onix, /ONIXMessage/Product/DescriptiveDetail/PrimaryContentType[text() = "10"] OR the result of calling check for node on onix, /ONIXMessage/Product/DescriptiveDetail/ProductContentType[text() = "10"].
  4. LET text_within_images be the result of calling check for node on onix, /ONIXMessage/Product/DescriptiveDetail/PrimaryContentType[text() = "45"] OR the result of calling check for node on onix, /ONIXMessage/Product/DescriptiveDetail/ProductContentType[text() = "45"].
  5. LET images_of_text be the result of calling check for node on onix, /ONIXMessage/Product/DescriptiveDetail/PrimaryContentType[text() = "49"] OR the result of calling check for node on onix, /ONIXMessage/Product/DescriptiveDetail/ProductContentType[text() = "49"].

Instructions

  1. IF all_textual_content_can_be_modified: THEN display "Appearance can be modified".
  2. ELSE IF real_text AND NOT all_textual_content_can_be_modified: THEN display "Appearance cannot be modified".
  3. ELSE IF text_within_images OR images_of_text: THEN display "Appearance cannot be modified for all textual content".
  4. ELSE display "Appearance modifiability not known".

Charts, diagrams, and formulas

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

Hazards

This technique relates to Hazards key information.

Conformance

This technique relates to Conformance key information.

Accessibility summary

This technique relates to Accessibility summary key information.

Additional accessibility information

This technique relates to Additional accessibility information key information.

Acknowledgements

Contributors

Reviewers