Accessible inline links and the extra accessibility features

It can definitely be a hindrance for some users with a reduced vision such as achromatopsia (1 on 30 000): no colors.

A low contrast can also hinder the navigation of aging users who might experience contrast loss:

Those simulation of visual impairments were made using NoCoffee.


I got a couple of sources :slight_smile:
This is a violation to the Success Criterion 1.4.1 of WCAG 2.1 (level A):

Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element.

From Web Content Accessibility Guidelines (WCAG) 2.1
Anchors have an action (usually redirect to their href when the user clicks on them). So they should be distinct visually from the rest of the text. The usual solution is to underline the link. It works whatever the context around the link, except if the text around it is also underlined (which pretty much never happens).
However, the WAI publishes Failures and Techniques to clear up edge cases. One of those Techniques is G183: Using a contrast ratio of 3:1 with surrounding text and providing additional visual cues on hover for links or controls where color alone is used to identify them | WAI | W3C :

To meet success criterion 1.4.1: Use of Color a relative luminance (lightness) difference of 3:1 or greater with the text around can be used.

The current link color is already set to match the lightest possible value in regards to the background. See this forum post about color theme changes for minimum contrast. This means we can easily make the links darker, but not lighter since this would violate SC 1.4.3: contrast mininum. Making it lighter would be complex since we’d need to also change the color of ALL the backgrounds where this link color is used.
Supposing we use a black text and white background, we can have a lightness that’s typically between 0.36 and 0.47 (depends on the saturation but that’s approximately the same size of the range whatever the saturation).
contrastAnchors

We don’t use black text in XWiki but a dark grey #333333 lightness 0.2 (e.g. text on the Home page with the Iceberg color-theme). This is enough to reduce the “correct” range for link color to nothing even if we suppose the background is white (we’d need colors with a luminosity of at least 0.5 and at most 0.47).
I played a bit with different lightness/saturation values but couldn’t find a pair that’d match #333333-dark grey text and #ffffff-white background.

In order for the current color to be appropriate, we could make the regular text darker:
from #333333 (lightness 0.2) to #222222 (lightness 0.13). Again, we’d need to make sure ALL text with inline links would be written with this color. For example, the user name in the “Last modified by” text should be changed too.

From bottom to top: black, #222222, #333333, #2f6faf = link color
Color Hunt Palette 2f6faf333333222222000000

+1


Summing up the possibilities that seem correct so far:

  • 3:1 contrast: Make the default text darker and change text color too where inline links are used.
  • Underlining links but we’d need at least a vote and it’ll probably be heavier to implement if we decide to only underline inline links.