Unverified Commit 6b98f2ca authored by chunhtai's avatar chunhtai Committed by GitHub

labeledTapTargetGuideline should passe if textfield does not have label (#116221)

parent 9532b91c
......@@ -219,7 +219,8 @@ class LabeledTapTargetGuideline extends AccessibilityGuideline {
});
if (node.isMergedIntoParent ||
node.isInvisible ||
node.hasFlag(ui.SemanticsFlag.isHidden)) {
node.hasFlag(ui.SemanticsFlag.isHidden) ||
node.hasFlag(ui.SemanticsFlag.isTextField)) {
return result;
}
final SemanticsData data = node.getSemanticsData();
......
......@@ -874,6 +874,14 @@ void main() {
expect(result.passed, true);
handle.dispose();
});
testWidgets('Passes if text field does not have label', (WidgetTester tester) async {
final SemanticsHandle handle = tester.ensureSemantics();
await tester.pumpWidget(_boilerplate(const TextField()));
final Evaluation result = await labeledTapTargetGuideline.evaluate(tester);
expect(result.passed, true);
handle.dispose();
});
});
testWidgets('regression test for material widget',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment