Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
dd5d0d6c
Unverified
Commit
dd5d0d6c
authored
May 06, 2019
by
Jonah Williams
Committed by
GitHub
May 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename foreground and background to light and dark (#32070)
parent
99e7b0a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
accessibility.dart
packages/flutter_test/lib/src/accessibility.dart
+4
-3
accessibility_test.dart
packages/flutter_test/test/accessibility_test.dart
+1
-1
No files found.
packages/flutter_test/lib/src/accessibility.dart
View file @
dd5d0d6c
...
...
@@ -277,13 +277,14 @@ class MinimumTextContrastGuideline extends AccessibilityGuideline {
}
else
{
targetContrastRatio
=
kMinimumRatioNormalText
;
}
if
(
contrastRatio
-
targetContrastRatio
>=
delta
)
if
(
contrastRatio
-
targetContrastRatio
>=
delta
)
{
return
result
+
const
Evaluation
.
pass
();
}
return
result
+
Evaluation
.
fail
(
'
$node
:
\n
Expected contrast ratio of at least '
'
$targetContrastRatio
but found
${contrastRatio.toStringAsFixed(2)}
for a font size of
$fontSize
. '
'The computed
foreground
color was:
${report.lightColor}
, '
'The computed
background
color was:
${report.darkColor}
\n
'
'The computed
light
color was:
${report.lightColor}
, '
'The computed
dark
color was:
${report.darkColor}
\n
'
'See also: https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html'
);
}
...
...
packages/flutter_test/test/accessibility_test.dart
View file @
dd5d0d6c
...
...
@@ -126,7 +126,7 @@ void main() {
'SemanticsNode#21(Rect.fromLTRB(300.0, 200.0, 500.0, 400.0), label: "this is a test",'
' textDirection: ltr):
\n
Expected contrast ratio of at least '
'4.5 but found 1.17 for a font size of 14.0. The '
'computed
foreground color was: Color(0xfffafafa), The computed background
color was:'
'computed
light color was: Color(0xfffafafa), The computed dark
color was:'
' Color(0xffffeb3b)
\n
'
'See also: https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html'
);
handle
.
dispose
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment