MinimumTextContrastGuidelineAAA class

A guideline which verifies that all nodes that contribute semantics via text meet WCAG AAA contrast levels.

The AAA level is defined by the Web Content Accessibility Guidelines: https://www.w3.org/WAI/WCAG22/Understanding/contrast-enhanced

This guideline enforces a stricter contrast ratio:

  • Normal text must have a contrast ratio of at least 7.0
  • Large or bold text must have a contrast ratio of at least 4.5

See also:

Inheritance
Annotations

Constructors

MinimumTextContrastGuidelineAAA.new()
Create a new MinimumTextContrastGuidelineAAA.
const

Properties

description String
A description of the policy restrictions and criteria.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

evaluate(WidgetTester tester) Future<Evaluation>
Evaluate whether the current state of the tester conforms to the rule.
inherited
isNodeOffScreen(Rect paintBounds, FlutterView window) bool
Returns if a rectangle of node is off the screen.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldSkipNode(SemanticsData data) bool
Returns whether node should be skipped.
inherited
targetContrastRatio(double? fontSize, {required bool bold}) double
Returns the required contrast ratio for the fontSize and bold setting.
override
toString() String
A string representation of this object.
inherited

Operators

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

Constants

kAAAMinimumRatioLargeText → const double
The minimum contrast ratio for large text (bold ≥14px or ≥18px).
kAAAMinimumRatioNormalText → const double
The minimum contrast ratio for normal text.