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.
I found this issue while quickly looking over the Colors Modifier, but it could also apply to other modifiers.
With the colors modifier it is possible to set properties on the :hover pseudo-element, with this there is an accessibility issue when the visitor is not using a mouse.
This can be fixed by setting the :focus pseudo-element as well as the :hover pseudo-element. It can be tested by using the tab key to move between selectable elements.
Comments
Comment #2
murrayw CreditAttribution: murrayw commentedThanks for bringing this issue to our attention. I've goofgles around a bit for more info and it was hard to come by. I did find the following material though.
So the suggestion appears to be that we should also set the :focus as well so that it behaves consistently when using teh keyboard. Sounds fair enough to me. This should be an esy addition.
Off the top of my head I can't think of other areas where we are using hover, but maybe there are. Will keep a look out for that.
Comment #3
mgiffordIt's a common error.. So often hover is styled explicitly but focus isn't. It's definitely an accessibility problem though.
Comment #6
kybermanHi, thank you all for this advice, we updated the code accordingly.