Skip to content

Fix focus colour for footer links#313

Merged
finnlewis merged 3 commits into2.xfrom
feature/307-footer-link-focus
Jun 3, 2025
Merged

Fix focus colour for footer links#313
finnlewis merged 3 commits into2.xfrom
feature/307-footer-link-focus

Conversation

@markconroy
Copy link
Member

Closes #307

What does this change?

Sets the focus state for links in footer to be dark (on yellow) instead of white (on yellow)

@msayoung
Copy link
Member

msayoung commented Apr 1, 2025

@markconroy - the link text is now invisble on hover ! :)

@markconroy
Copy link
Member Author

@msayoung ready for another review.

Copy link
Member

@msayoung msayoung left a comment

Choose a reason for hiding this comment

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

Really sorry @markconroy

This is better , but now when you focus and THEN hover the text returns to white on yellow.

Can we keep it black please?

@markconroy
Copy link
Member Author

@msayoung I'm not sure this is fixable.

I'm not aware of a CSS property for "do this when hovered and focussed at the same time", I think we've only got :hover and :focus, unless we put !important perhaps on the :hover state?

@markconroy
Copy link
Member Author

@msayoung any thoughts on my last comment above? I think we might need to merge this as is.

@msayoung
Copy link
Member

@markconroy you can chain psuedo classes so in this case I think we'd want to go for:

.region-microsites-footer a:focus,
.region-microsites-footer a:hover:focus{
  color: var(--footer-link-focus-color);
}
                        
.region-microsites-footer a:hover {
  color: var(--footer-link-hover-color);
}

@markconroy
Copy link
Member Author

@msayoung ready for a retest.

@msayoung msayoung self-requested a review June 3, 2025 11:23
@finnlewis finnlewis merged commit 5e83d14 into 2.x Jun 3, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Focus appearance / text contrast of footer links

3 participants