TextScalingRule

class TextScalingRule(screenDensity: Float, scaleFactor: Float = 1.3f) : BaseScanRule

Flags text that may clip when simulated at a larger font scale.

Parameters

screenDensity

Display density from DisplayMetrics.density.

scaleFactor

Font scale to simulate (default 1.3x).

Constructors

Link copied to clipboard
constructor(screenDensity: Float, scaleFactor: Float = 1.3f)

Properties

Link copied to clipboard
open override val ruleId: String

Stable id for the text scaling rule.

Link copied to clipboard
open override val ruleName: String

Human-readable rule name.

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

Severity assigned to possible text clipping.

Link copied to clipboard
open override val wcagReference: String

WCAG criterion associated with resized text.

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 text nodes against their parent bounds at the configured scale factor.