annotation module

Annotations are part of the ARIA spec, used to create relationships between nodes. For example: comment reply chains, terms with definitions, footnotes.

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Annotations

class annotation.AnnotationTarget

Bases: object

Structured information of an annotation target. For example, the definition of a term.

property role: controlTypes.Role | None
property targetObject: NVDAObject
property summary: str
class annotation.AnnotationOrigin(originObj: NVDAObject)

Bases: object

Structured information of an annotation origin. Each origin may have many annotation targets. Targets can have different roles. For example, a phrase with a footnote and comments associated with it. This class encapsulates the relation.

property targets: Tuple[AnnotationTarget]
property roles: Tuple[controlTypes.Role | None]
class annotation._AnnotationNavigationNode(origin: NVDAObject, indexOfLastReportedSummary: int | None = None)

Bases: object

Node used in _AnnotationNavigation, for navigating between annotations.

_TargetIndex

alias of int

origin: NVDAObject
indexOfLastReportedSummary: int | None = None
class annotation._AnnotationNavigation

Bases: object

Used to manage navigation of annotations. For example, reporting a summary of each comment for an object with multiple comment annotation targets.

lastReported: _AnnotationNavigationNode | None = None
priorOrigins: List[NVDAObject] = []