AccessibilityGuideline class abstract

An accessibility guideline describes a recommendation an application should meet to be considered accessible.

Use meetsGuideline matcher to test whether a screen meets the accessibility guideline.

This sample demonstrates how to run an accessibility guideline in a unit test against a single screen.
link
testWidgets('HomePage meets androidTapTargetGuideline', (WidgetTester tester) async {
  final SemanticsHandle handle = tester.ensureSemantics();
  await tester.pumpWidget(const MaterialApp(home: HomePage()));
  await expectLater(tester, meetsGuideline(androidTapTargetGuideline));
  handle.dispose();
});

See also:

Implementers

Constructors

AccessibilityGuideline()
A const constructor allows subclasses to be const.
const

Properties

description String
A description of the policy restrictions and criteria.
no setter
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) FutureOr<Evaluation>
Evaluate whether the current state of the tester conforms to the rule.
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