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

Incorrect color of header and footer navigation links #213

Closed
adamwoodnz opened this issue Jul 6, 2022 · 3 comments · Fixed by #214 or #215
Closed

Incorrect color of header and footer navigation links #213

adamwoodnz opened this issue Jul 6, 2022 · 3 comments · Fixed by #214 or #215

Comments

@adamwoodnz
Copy link
Contributor

The navigation links in the header for wordpress.org and make.wordpress.org should be white and instead are displaying as #21759b. This is resulting in a very poor accessibility color contrast rating.

image

Color contrast score: https://coolors.co/contrast-checker/0072a9-23282d
Screen Shot 2022-07-07 at 10 01 10 AM

@iandunn
Copy link
Member

iandunn commented Jul 6, 2022

I'm seeing it after a hard refresh. I'm guessing this is another case where something in the latest Gutenberg plugin changed, and either:

  1. exposed an instance of us doing something wrong; or
  2. broke back-compat

That's been an ongoing problem since we launched the header/footer.

It looks like the problem is that wp-block-navigation-item__label is inheriting color from https://s.w.org/wp-content/themes/pub/wporg-main/css/style.css?ver=1653615553 line 690. It doesn't happen on /news, since that site doesn't load the wporg-main theme. I'm guessing that before Gutenberg 13.6.0 there was some style that applied the color: white, but now that's gone, or is different.

A good quick fix might be just adding something like this to global-header-footer/postcss/header/menu.pcss:

.wp-block-group.global-header .global-header__navigation .wp-block-navigation__container .wp-block-navigation-item a {
  color: var(--wp--preset--color--white);
}

Once production looks good, we can dig deeper into the problem and look into a more "correct" fix.

@adamwoodnz
Copy link
Contributor Author

Yep I've discovered Gutenberg 13.6.0 removed

.wp-block-navigation .wp-block-navigation-item__content {
    color: inherit;
}

I'll make the quick fix, thanks

@adamwoodnz
Copy link
Contributor Author

Reopened as this affects the footer links as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants