Referenceannotations

<annotations>

A container of annotation children for screen reader navigation of a graph

<annotations> is the container element placed inside a <graph> to hold one or more <annotation> children. It tells the Prefigure backend how the graph should be described and navigated by assistive technology.

Only graphs rendered with renderer="prefigure" consult this container. Other renderers ignore it.

If multiple <annotations> components are present, only the last one is used; the earlier ones are ignored.

Tip: use the <annotations-skeleton> snippet to prefill the <annotations> with one <annotation> for each object in the graph.

Attributes and Properties

Attributes for <annotations>

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <annotations name="a">

Other (4)
$a.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$a.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$a.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$a.hidden

boolean. Whether this component is hidden from the rendered output.

Common to all components (4)
$a.doenetML

text. The DoenetML source code that produced this component.

$a.hide

boolean. Whether to hide this component from the rendered output.

$a.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$a.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: Add annotations to a Prefigure graph

The <annotations> element wraps one root <annotation> child that describes the entire graph. Inside that root, additional <annotation> components describe individual graph elements to screen readers.


Example: Group annotations hierarchically

The root <annotation> may contain a tree of nested <annotation> elements that mirrors the logical structure of the graph, so screen-reader users can drill down from groups to individual elements.