FocusOrderRule

class FocusOrderRule(screenDensity: Float, jumpThresholdDp: Float = 8.0f) : BaseScanRule

Flags focus traversal that jumps upward relative to visual top-to-bottom order.

Parameters

screenDensity

Display density from DisplayMetrics.density. Used to convert jumpThresholdDp to pixels for comparison against A11yNode.bounds.

jumpThresholdDp

Upward movement that triggers a violation (default 8dp).

Constructors

Link copied to clipboard
constructor(screenDensity: Float, jumpThresholdDp: Float = 8.0f)

Properties

Link copied to clipboard
open override val ruleId: String

Stable id for the focus order rule.

Link copied to clipboard
open override val ruleName: String

Human-readable rule name.

Link copied to clipboard
open override val severity: A11ySeverity.Error

Severity assigned to focus order jumps.

Link copied to clipboard
open override val wcagReference: String

WCAG criterion associated with focus order.

Functions

Link copied to clipboard
override fun evaluate(node: A11yNode): A11yIssue?
Link copied to clipboard
open override fun evaluateAll(nodes: List<A11yNode>): List<A11yIssue>

Evaluates all focusable nodes in semantics order.