Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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]
Comment | File | Size | Author |
---|---|---|---|
#11 | ootb-toolbar-tabbed-focus-check.gif | 123.74 KB | JayKandari |
#8 | toolbar-hover-2941647.gif | 1.14 MB | JayKandari |
#6 | patch-test-admin.png | 60.58 KB | cehfisher |
#6 | admin-hover-color.gif | 153.86 KB | cehfisher |
#5 | 2941647-5.patch | 1.39 KB | markconroy |
Comments
Comment #2
smazComment #3
tomphippen CreditAttribution: tomphippen commentedI've fixed this with the following code, just checking for any objections in the slack channel before doing the patch.
Comment #4
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedI wonder if we set the admin toolbar css library to load after the umami theme css, would that be a better approach?
Comment #5
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedI 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.
Comment #6
cehfisher CreditAttribution: cehfisher at Hook 42 commentedThe 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.
Comment #7
cchoudhary CreditAttribution: cchoudhary at ]init[ AG commentedPatch in #5 is working as expected and applies cleanly. Tested with drupal 8.6.x
Comment #8
JayKandari+1 for #5. Applies cleanly and no pale green bg color showing for admin toolbar. Marking this RTBC.
Screenshot:
Comment #9
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedDid 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.
Comment #10
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedComment #11
JayKandariHi @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!! :)
Comment #12
andrewmacpherson CreditAttribution: andrewmacpherson as a volunteer and at Annertech commentedThat's great thanks @JayKandari . I can see focus moving while the mouse pointer remains still in #11
Comment #15
Gábor HojtsyI agree this does not look like a technically fantastic solution but it makes sense and is what our CSS styling system allows. Thanks all!