Skip to content

Conversation

@brendankenny
Copy link
Contributor

yarn smoke a11y fails in color-contrast on the Mac because the font size is different than Linux and the stricter expectations introduced in #8961 work on Linux :)

This loosens up the requirement, which is fine because this is just the explanation string, not what the audit was testing.

'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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants