TapTargetSizeRule class

Flags interactive widgets whose tap target is smaller than minimumSize in either dimension.

Defaults to 48x48dp, the Material/WCAG 2.5.5 minimum. Which widget types count as "interactive" and what the minimum is are both overridable — the hook for teams enforcing their own design-system tap-size token instead of (or on top of) the platform default.

Inheritance

Constructors

TapTargetSizeRule({double minimumSize = 48.0, Set<Type> interactiveTypes = defaultInteractiveTypes})
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
interactiveTypes Set<Type>
final
minimumSize double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

check(List<A11yElementInfo> elements) List<A11yViolation>
Inspects elements — a snapshot of the tree captured by the ElementTreeWalker — 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

Constants

defaultInteractiveTypes → const Set<Type>
Common interactive widgets from both Material and Cupertino.