Skip to content

Commit

Permalink
tests: relax contrast font size expectation (#9441)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny authored and paulirish committed Jul 24, 2019
1 parent 85429f9 commit e2afa08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lighthouse-cli/test/smokehouse/a11y/expectations.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ module.exports = [
'type': 'node',
'selector': '#color-contrast',
'snippet': '<div id="color-contrast" style="background-color: red; color: pink;">\n Hello\n </div>',
'explanation': 'Fix any of the following:\n Element has insufficient color contrast of 2.59 (foreground color: #ffc0cb, background color: #ff0000, font size: 28.5pt, font weight: normal). Expected contrast ratio of 3:1',
// Default font size is different depending on the platform (e.g. 28.5 on travis, 30.0 on Mac), so use \d\d\.\d.
'explanation': /^Fix any of the following:\n {2}Element has insufficient color contrast of 2\.59 \(foreground color: #ffc0cb, background color: #ff0000, font size: \d\d\.\dpt, font weight: normal\). Expected contrast ratio of 3:1$/,
'nodeLabel': 'Hello',
},
},
Expand Down

0 comments on commit e2afa08

Please sign in to comment.