Accessibility
In a PNG or a JPG the text is pixels: TalkBack, VoiceOver or Narrator cannot read it. In an .oim every text layer travels as real text, in every language, inside the signed file. <oim-player> uses that to make the work readable by a screen reader, with no extra work for most layers.
What a screen reader hears
- The work, announced as a figure. Its name is the document
descriptionin the active language; without one, the first text; without any text, "Image". - The texts, in visual reading order: top to bottom, then left to right (layers within 8 px vertically count as one row). Each is read in the active language, with its
langset, so the voice changes with it. - Pictures with a description (
imageandsvglayers withalt), at their place in that order. - Interactive layers with active actions, as buttons named by their text or
alt, reachable with the keyboard (Enter or Space does what a click does).
Skipped: layers marked decorative, pictures without a description, the flattened base image and the duplicated tracks of a scene loop.
The reading layer is built once when the work loads and again when the language changes. It costs nothing per frame.
Describing a work
| Field | Where | Type | Meaning |
|---|---|---|---|
alt | layer style | { [lang]: string }, up to 300 characters each | What the picture shows |
decorative | layer style | boolean | Screen readers skip it; wins over alt |
description | document root | { [lang]: string }, up to 1000 characters each | Summary of the whole work |
- Missing language in
alt: the document's primary language is used; if that is missing too, the picture is skipped. - A blank description counts as none.
- All three are inside the signature: changing them breaks it, like any other field.
- They are plain text. The player writes them with
textContent/setAttribute, never as HTML.
Texts need nothing: they are read as they are.
In OIM Studio and the MCP
- Studio: select an image or SVG → Accessibility: a description per language and a Decorative checkbox. A warning shows while a picture has neither. The work's description is typed in the export dialog.
- MCP:
altanddecorativeare accepted when creating or updating layers; tools returnaccessibility: [{ id, mensaje }]for pictures left without either.
Added in contract 1.16.0. Files written before it are read the same way, minus the descriptions they do not have.