FocusOrderRule class

Flags sibling groups of interactive semantics nodes whose traversal order — the order a screen reader or switch-access user would move through them — doesn't match their visual reading order (top-to-bottom, then left-to-right).

SemanticsNode children are already given to us in effective traversal order (build order, unless the app set an explicit sort key), so this compares that order directly against a geometry-sorted copy rather than trying to re-derive traversal order itself.

This is a heuristic, not a WCAG-exact check: "same row" is decided by whether two nodes' vertical centers are close relative to their height, which can misjudge unusually-shaped or overlapping layouts. It also only compares direct siblings — a large layout intentionally split into multiple traversal groups (e.g. via Semantics(sortKey: ...)) is evaluated group by group, which is usually what you want, but can miss a genuine cross-group ordering problem.

Inheritance

Constructors

FocusOrderRule()
const

Properties

description → String
Short human-readable description of what this rule checks.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable identifier used in A11yViolation.ruleId and reports.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

check(List<A11ySemanticsNodeInfo> nodes) → List<A11yViolation>
Inspects nodes — a snapshot captured by SemanticsTreeWalker — and returns any violations found.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited