The checks of --check that need no tool: they read the deck and its HTML
Expresso.Check runs these checks at each level. Each check returns a list
of problems and a list of notes. A problem makes the exit status 1. A note
tells of a choice that can be correct, such as an image with no alt text.
| Check | Kind | Finds |
|---|---|---|
theme/1 | problem | Each role of a theme of 16 colors under its minimum of contrast |
theme/1 | note | Each variant of the theme that does not dim at the dim_contrast option |
size/1 | note | The size of the document, and its largest files |
slides/1 | note | An image with no alt text, a diagram with no alt text, a slide with only a hidden heading, and a slide with no h1 |
Summary
Functions
Return a note with the size of the document, and with the size and the type of its largest files
Return a note for each slide with a part that a screen reader reads differently
Return a problem for each role of the theme of the deck under its minimum of contrast
Types
Functions
Return a note with the size of the document, and with the size and the type of its largest files
A file is a data URI in a src, an href or an xlink:href attribute, or
in a url() of a style sheet, such as a font of the theme.
Expresso.Assets keeps one copy of each large file, so the note names each
file one time.
iex> Expresso.Check.Document.size(String.duplicate("a", 2_500_000))
%{problems: [], notes: ["The document is 2.4 MB."]}
Return a note for each slide with a part that a screen reader reads differently
The function reads the present view of each slide in the HTML, and it gives a note for:
- an image with an empty
alt. A screen reader skips such an image. - a diagram with no
altoption. A screen reader reads the text of its SVG. - a slide with only a hidden heading. A screen reader reads the heading, but the slide shows no title.
- a slide with no
h1, from the optionsr_heading false.
@spec theme(Expresso.Deck.t()) :: result()
Return a problem for each role of the theme of the deck under its minimum of contrast
The problems are the warnings of Expresso.ThemeVerifier.messages/1. A
built-in theme has no problem. The notes are the warnings of
Expresso.ThemeVerifier.dim_messages/2: a deck that does not dim can be
correct, so they do not change the exit status.