Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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$/,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the {2} is because we apparently have an eslint rule for not allowing multiple spaces in a row 🤷‍♀

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'nodeLabel': 'Hello',
},
},
Expand Down