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.
This is a follow up from #2938194: Focus styles should meet accessibility guidelines in Umami theme
===
The coloured background of link focus in a sentence is a bit weak, and will not survive in Windows high contrast mode. An outline is preferable. outline-offset:1px can make it look a bit less crowded.
===
Comment | File | Size | Author |
---|---|---|---|
#10 | 04-hovered-state.png | 50.07 KB | markconroy |
#10 | 03-current-default-state.png | 49.62 KB | markconroy |
#10 | 02-focus-state-with-patch.png | 50.79 KB | markconroy |
#10 | 01-current-focus-state.png | 50.24 KB | markconroy |
#9 | 2942490_coloured_background_of_link_focus_in_a_sentence_is_a_bit_weak_9.patch | 398 bytes | swati.nuna |
Comments
Comment #2
mgiffordA screenshot would be nice.
Comment #3
smazComment #4
markconroy CreditAttribution: markconroy at Annertech commentedHi @mikegifford,
Just checking in with you on this one. From my testing, we have outline styles left in place when people focus on a link. See here:
When a use hovers on a link, we change from
text-decoration: underline
totext-decoration: none
.Is this enough to consider this issue fixed, or is there more you think we can achieve here?
Comment #5
markconroy CreditAttribution: markconroy at Annertech commentedComment #6
markconroy CreditAttribution: markconroy at Annertech commentedIt looks like we do have outline left in place, but it might be a nicer addition if we added
outline-offset: 1px;
to links, so they are less crowded when focussed.Anyone feel like writing 1 line of css?
In core/profiles/demo_umami/themes/umami/css/base.css, change this:
to this:
Comment #7
dean-coakley CreditAttribution: dean-coakley as a volunteer commentedFirst time contributor.
Let me know what I did wrong @markconroy
I was unable to figure out how to give myself creditEDIT: Looks like it worked
Comment #8
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedHi Dean,
Thanks for very much for that, and welcome to Drupal contributing.
The code you have looks correct, but the patch you uploaded does not seem to be a patch file. It looks like it's a copy/paste of a git commit saved as a file with .patch at the end of it.
Here's a link to how to create a patch file - https://www.drupal.org/patch. I know it might seem like overkill for such a simple issue, but we try really hard to make sure we do things correctly - even on these novice issues - to make sure that you'll be able to do the same on more complex issues later.
Also, since we don't have regression testing built in for the frontend, it's helpful if you can provide a before and after screenshot. In this case, a screenshot of a link in a recipe/article body field, when it is normal, hovered, and focussed would be great.
If you can get that done, I'll review it again for you.
Thanks again.
Comment #9
swati.nuna CreditAttribution: swati.nuna as a volunteer and at InfoBeans Technologies Limited commentedHi,
I have added the patch file.
Please check.
Comment #10
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedThanks @swati.nuna,
This looks good to me. Marking as Reviewed and tested by the community (RTBC).
Committers - can you please make sure @deanc96 gets a credit for this issue as a first time contributor. Thanks.
Screenshots:
umami link current focus state
umami link focus state after patch
umami link current default state
umami link current hovered state
Comment #12
markconroy CreditAttribution: markconroy as a volunteer and at Annertech commentedCan this be committed?
The failing tests are false positives from the code being inside a media query.
Comment #14
lauriiiComment #15
Eli-TComment #16
kjay CreditAttribution: kjay commentedOn the basis this is RTBC'd for outline on focus being present and enhanced with an offset, this issue does seem good to go.
I tested across the browsers, including IE11 and up and it works as expected. We get the native browser outline on focus, though the effect of the offset seemed to have varying impact when subject to the browser's style of outline. Not a problem since offset is just an enhancement.
There is a consensus that link, hover, active and focus states need further design work in support of our accessibility goals and so we can follow that up in a separate issue but this one looks good to go to me.
Comment #18
lauriiiGiving credit as well for @Eli-T for triaging the issue queue and @kjay for your feedback on the issue.
Committed daa1269 and pushed to 8.6.x. Also cherry-picked bcf7a53 and pushed to 8.5.x. Thanks! 🎉
Comment #20
lauriii