Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates colors for a11y contrast requirements #9432

Merged
merged 4 commits into from
Oct 25, 2023

Conversation

atsansone
Copy link
Contributor

@atsansone atsansone commented Sep 20, 2023

Fixes #9427

Staged: https://tony-flutter-site--docs-6warcibu.web.app

This doesn't cover updates to the lexer colors. That will happen later.

These changes:

  • Darkened text color to create the required contrast between body background. (Current 3.49:1, Needs 4.5:1)
  • Darkened background color of button to contrast with link text. (Current 3.79:1, Needs 4.5:1)
  • Darkened text color of code text to contrast with the background. (Current 3.99:1, Needs 4.5:1)
  • Darkened text color of copy to contrast with the link text. (Current 2.54, Needs 3:1)
  • Change heading font settings to Design Standards.

Current:

image

Changed:

image

@atsansone atsansone added infra.design Relates to the design of docs.flutter.dev review.tech Awaiting Technical Review labels Sep 20, 2023
@atsansone atsansone requested a review from mit-mit September 21, 2023 15:27
@atsansone
Copy link
Contributor Author

@mit-mit : This is consistent with the Flutter branding guidelines. I would appreciate your approval.

@parlough
Copy link
Member

parlough commented Sep 21, 2023

I haven't taken a deep look yet, but the change results in a much darker background color on the banner which doesn't fit the style of the site or Flutter's lighter color scheme. It's also hard to distinguish the new link text color on the banner from non-links. Consider exploring other options for at least the banner.

@atsansone
Copy link
Contributor Author

It's consistent with the branding. We should wait for @mit-mit to comment.

@parlough
Copy link
Member

I'm happy to wait for others' thoughts. Can you update the staged link? It seems to not have these changes anymore.


For more on my earlier comments: It's more than just applying a brand color though. The brand guidelines suggest Flutter leans towards the lighter side and Dart leans towards the darker side, but with this change, the first major color users see on this site would be one of the darkest colors, especially since this color makes it particularly stand out from the rest of the page.

And whatever color is chosen, the larger concern that should be addressed is the reduced contrast/difference in the banner between the text and the non-link text colors. I'd be happy to try out or discuss other options with you.

@atsansone atsansone added review.copy Awaiting Copy Review and removed review.tech Awaiting Technical Review labels Oct 7, 2023
Copy link
Member

@parlough parlough left a comment

Choose a reason for hiding this comment

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

Thanks for adjusting the banner! It's still a bit too dark for the overall Flutter branding, but we can go with it for now to get the other fixes closer to landing.

One other issue with the sidenav border colors remains though:

src/_sass/base/_variables.scss Outdated Show resolved Hide resolved
@parlough parlough added review.await-update Awaiting Updates after Edits and removed review.copy Awaiting Copy Review labels Oct 15, 2023
@parlough parlough assigned atsansone and unassigned domesticmouse Oct 15, 2023
@mit-mit
Copy link
Member

mit-mit commented Oct 25, 2023

Thanks for adding the description; this LGTM

@atsansone atsansone merged commit 5001637 into flutter:main Oct 25, 2023
atsansone added a commit to atsansone/website that referenced this pull request Oct 25, 2023
Fixes flutter#9427

Staged: https://tony-flutter-site--docs-6warcibu.web.app

This doesn't cover updates to the lexer colors. That will happen later.

These changes:

- Darkened text color to create the required contrast between body
background. (Current 3.49:1, Needs 4.5:1)
- Darkened background color of button to contrast with link text.
(Current 3.79:1, Needs 4.5:1)
- Darkened text color of code text to contrast with the background.
(Current 3.99:1, Needs 4.5:1)
- Darkened text color of copy to contrast with the link text. (Current
2.54, Needs 3:1)
- Change heading font settings to Design Standards.

Current:

![image](https://github.com/flutter/website/assets/706219/bf85e141-b2e8-4b21-a6fd-0c78f2c67f10)

Changed:

![image](https://github.com/flutter/website/assets/706219/515d454e-e39f-4d1b-875d-0026373db12a)

---------

Co-authored-by: Parker Lougheed <[email protected]>
@sfshaza2 sfshaza2 removed the review.await-update Awaiting Updates after Edits label Nov 6, 2023
atsansone added a commit to atsansone/website that referenced this pull request Nov 14, 2023
Fixes flutter#9427

Staged: https://tony-flutter-site--docs-6warcibu.web.app

This doesn't cover updates to the lexer colors. That will happen later.

These changes:

- Darkened text color to create the required contrast between body
background. (Current 3.49:1, Needs 4.5:1)
- Darkened background color of button to contrast with link text.
(Current 3.79:1, Needs 4.5:1)
- Darkened text color of code text to contrast with the background.
(Current 3.99:1, Needs 4.5:1)
- Darkened text color of copy to contrast with the link text. (Current
2.54, Needs 3:1)
- Change heading font settings to Design Standards.

Current:


![image](https://github.com/flutter/website/assets/706219/bf85e141-b2e8-4b21-a6fd-0c78f2c67f10)

Changed:


![image](https://github.com/flutter/website/assets/706219/515d454e-e39f-4d1b-875d-0026373db12a)

---------

Co-authored-by: Parker Lougheed <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra.design Relates to the design of docs.flutter.dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Correct CSS to match brand color palette and meet accessibility requirements
5 participants