Hovering over items in the administration toolbar turns the background colour of the link to pale green. This is unintentional.

Hover styles should not apply to the toolbar, the defaults should be used.


[Credit to Yoroy for the screenshot]

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

smaz created an issue. See original summary.

smaz’s picture

Issue summary: View changes
tomphippen’s picture

I've fixed this with the following code, just checking for any objections in the slack channel before doing the patch.

a:not(.toolbar a):hover,
a:not(.toolbar a):focus {
  background-color: #e6eee0;
  color: #444444;
  text-decoration: none;
}
markconroy’s picture

I wonder if we set the admin toolbar css library to load after the umami theme css, would that be a better approach?

markconroy’s picture

Status: Active » Needs review
Issue tags: +Out of the Box Initiative
FileSize
1.39 KB

I couldn't get this to work using the :not approach. Here's a patch that adds a new library to our theme for the toolbar only, and sets the background colour of toolbar links to inherit.

I'm not sure if it's the best approach, but it does seem to work.

cehfisher’s picture

FileSize
153.86 KB
60.58 KB

The patch in #5 and the applied styles look good! Attaching a image of the patch cleanly applied and a gif of the hover effect. If you didn't want to make a new toolbar component, you could have targeted the 'dialog-off-canvas-main-canvas' class on the link hover effect. Either way works just depends on your perspective.

cchoudhary’s picture

Patch in #5 is working as expected and applies cleanly. Tested with drupal 8.6.x

JayKandari’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
1.14 MB

+1 for #5. Applies cleanly and no pale green bg color showing for admin toolbar. Marking this RTBC.

Screenshot:
Admin toolbar background issue solved.

andrewmacpherson’s picture

Issue tags: +Accessibility

Did you test if the issue if fixed for focus states too?

This deserves the accessibility tag, as it's about fixing a contrast failure. One of these days, I'll add up some figures on how many accessibility issues are being fixed in core.

andrewmacpherson’s picture

JayKandari’s picture

Hi @andrew,

Yes, I did checked with tabbed focus. Attaching a SS.

Pls, note I'm not at all an accessibility guy, I might be missing something. Thanks!! :)

andrewmacpherson’s picture

That's great thanks @JayKandari . I can see focus moving while the mouse pointer remains still in #11

  • Gábor Hojtsy committed cdbf659 on 8.6.x
    Issue #2941647 by markconroy, JayKandari, cehfisher, smaz,...

  • Gábor Hojtsy committed 0d71c78 on 8.5.x
    Issue #2941647 by markconroy, JayKandari, cehfisher, smaz,...
Gábor Hojtsy’s picture

Version: 8.6.x-dev » 8.5.x-dev
Status: Reviewed & tested by the community » Fixed

I agree this does not look like a technically fantastic solution but it makes sense and is what our CSS styling system allows. Thanks all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.