Skip to content

Inference rule for visual adjustments (displayTransformability) #16

@HadrienGardeur

Description

@HadrienGardeur

Based on our work for parsing HTML/CSS (#180) we'll add a new inference rule for visual adjustments.

For this issue, we'll use a fairly naive approach where the metadata is only inferred if problematic CSS rules (TBD) are completely absent from both external stylesheets and inline styles.

Nonvisual reading ("accessModeSufficient": "textual") is also a pre-requisite to infer this metadata.

For further info, we can check the Daisy KB and the page dedicated to this property:

The displayTransformability value is used to indicate that a publication does not restrict the ability of users to modify the display of textual content (e.g., to change the font family, font size, line height and word spacing).

In order to set this value, all text content must be encoded as text (i.e., there must not be any images of text). In addition, absolute length units must not be used in the styling (e.g., pixels and points).

It is not required that a publication provide the means of transforming the text. It is expected that users who require this feature will have a reading system that with display transform options.

Since this additional inference requires parsing all HTML/CSS resources, it'll be added behind a new optional flag for both rwp manifest and rwp serve.

Metadata

Metadata

Assignees

Labels

manifestRelated to the manifest command

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions