ImageWithTextOverlayRule

class ImageWithTextOverlayRule(overlapThreshold: Float = 0.5f) : BaseScanRule

Flags text nodes that significantly overlap image nodes.

Parameters

overlapThreshold

Fraction of the text node's area that must intersect an image node before the pair is flagged (default 0.5 = 50%).

Constructors

Link copied to clipboard
constructor(overlapThreshold: Float = 0.5f)

Properties

Link copied to clipboard
open override val ruleId: String

Stable id for the image text overlay 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 image/text contrast risk.

Link copied to clipboard
open override val wcagReference: String

WCAG criterion associated with contrast.

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 text and image nodes together to find overlaps.