diff --git a/packages/flutter_test/lib/src/binding.dart b/packages/flutter_test/lib/src/binding.dart index d2544ef060c..8ec53720b7a 100644 --- a/packages/flutter_test/lib/src/binding.dart +++ b/packages/flutter_test/lib/src/binding.dart @@ -1505,7 +1505,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase return announcements; } - static const TextStyle _messageStyle = TextStyle(color: Color(0xFF917FFF), fontSize: 40.0); + static const TextStyle _messageStyle = TextStyle(color: Color(0xFF8F7FFF), fontSize: 40.0); static const Widget _preTestMessage = Center( child: Text('Test starting...', style: _messageStyle, textDirection: TextDirection.ltr), diff --git a/packages/flutter_test/test/pre_test_message_accessibility_test.dart b/packages/flutter_test/test/pre_test_message_accessibility_test.dart new file mode 100644 index 00000000000..f757ed9a09d --- /dev/null +++ b/packages/flutter_test/test/pre_test_message_accessibility_test.dart @@ -0,0 +1,15 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter_test/flutter_test.dart'; + +void main() { + /// Verifies that the pre-test message shown by flutter_test + /// meets the minimum WCAG text contrast accessibility guideline. + testWidgets('pre-test message meets text contrast guideline', (WidgetTester tester) async { + // The pre-test message is already attached to the render tree by the + // TestWidgetsFlutterBinding before this test runs, so no pumpWidget is needed. + await expectLater(tester, meetsGuideline(textContrastGuideline)); + }); +}