Problem/Motivation
Followup for #3438477: High contrast mode needs some more refinement
In regular mode the Skip to main content link has a clearly visible focus outline plus the background has a dark gray background inverting the regular white background making the skip link a clearly discernible element in focus:

In forced color mode the Skip to main content link has the same black background as the page plus it is missing a visible focus outline - the skip to element is barely recognizable that it is showing up nor that it is in focus in the first place.

Steps to reproduce
@mherchel provided a video how to activate the forced color mode in chromium based browsers like chrome or edge: https://www.youtube.com/watch?v=v4dTY4__F6U . after activating forced color mode simply press the tab key on for example admin/content
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | user_profile.jpg | 25.05 KB | rkoller |
| #11 | mr-skip.mp4 | 30.97 KB | rkoller |
| #11 | mr-skip.jpg | 29.93 KB | rkoller |
| #7 | updated_force_color.png | 5.61 KB | avanibhut2706 |
| forced_color.jpg | 8.58 KB | rkoller |
Issue fork drupal-3565271
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rkollerComment #3
rkollerComment #4
mgiffordThanks for testing in forced colors mode @rkoller it often gets missed and is often quite easy to ensure is supported.
Comment #7
avanibhut2706 commented@rkoller I’ve opened a merge request for this : https://git.drupalcode.org/project/drupal/-/merge_requests/14245
The update improves the visibility of the “Skip to main content” link in dark and forced-color modes. I’ve also added screenshots for reference.
Please review and let me know if any changes are needed.
Comment #9
avanibhut2706 commentedComment #10
dcam commentedOlivero has the exact same problem. Just my opinion, but I think the scope should be expanded to include it too. But for what it's worth, the MR worked as advertised for Claro.
Comment #11
rkollerat first apologies @avanibhut2706 for the late reply, the notification for this issue slipped through. :( and thank you for working on the MR! I've taken a look at MR14245, a few observations:
Looking at the screenshot in #7 the newly darkish "dirty" outline color makes me wonder what settings are you using in the render tab in chrome or edge? is it possible that you have checked the "enable automatic dark mode" checkbox? that causes some odd color display. it is necessary to either:
prefers-color-scheme: darkon theemulate CSS media feature prefers-color-scheme,forced -color:activeon emulate CSS media feature forced-colorsandprefers-contrast:moreon Emulate CSS medai feature prefers-contrasAppearanceand within thePage colorssection choose one of the themes in thepage colorsselect.I went with the first approach for testing and get:
that way it doesnt really look like an outline but rather sort of a background color plus it uses a different system color than for the focus (check out mr-skip.mp4). from my perspective it would be enough to simply show the focus outline in the system color of blue with the same width like for the rest of the focusable items.
re @dcam good point. i thought i would have already created a dedicated issue for olivero but after rechecking i have not. so yeah that needs the visible focus outline as well thank you! and yeah that could happen within this issue as well, no objection. except olivero probably needs some additional thought and adjustments. for one in olivero the skip link spans across the entire horizontal viewport as a black bar in regular mode. that is probably not necessary in forced color mode and the visual presentation of the skip link could be handled like in claro, after the bar isnt visible anyway. the only problem that needs also some adjustment in general is the position of the skip to link on user profile pages:
Comment #12
rkolleroh and one more thing. while reviewing i've already noticed a few regressions in forced color mode in general since i last worked on #3438477: High contrast mode needs some more refinement that recently got in. none of those were related to the skip link. so i was worried recent commits had introduced already regressions (but i havent looked at the diff itself only did an initial manual test). so after finishing my comment ive checked out the main branch and i wanted to dig in when those regressions got introduced but they were gone again. so i looked a bit closer at the diff of this MR and it looks like the scope is a bit broad and it is breaking many other elements on the page in forced color mode:
Comment #13
quietone commentedThe Claro theme was approved for removal in #3576460: [policy, no patch] Deprecate and remove Claro.
This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
The deprecation work is in #3576668: [meta] Tasks to deprecate Claro and the removal work in #3584638: [meta] Tasks to remove the Claro theme.
Comment #14
smustgrave commentedClaro has moved to contrib