littlefoot icon indicating copy to clipboard operation
littlefoot copied to clipboard

Accessibility: improve button contrast

Open biou opened this issue 4 years ago • 5 comments

I just checked the contrast of the grey button with the three white dots, and currently the contrast between this grey and white is of 1.3:1. It would be better if we could have a contrast of 3:1. This tool can help in finding more contrasted colors: Tanaguru contrast finder

biou avatar Jul 19 '20 15:07 biou

Hi @biou, I just pushed an overhaul of the styles for littlefoot, including a colour scheme change. I'm trying to keep a neutral scheme that would look reasonably decent by default on a variety of designs. If you could have a look at the code (in the master branch), that'd be appreciated. Thanks!

goblindegook avatar Oct 27 '20 22:10 goblindegook

No problem, I will have a look in the next few days.

biou avatar Oct 28 '20 20:10 biou

For the default button, the contrasts are ok. When you display the number of the footnote by customising the buttonTemplate, then the contrast is not sufficient. For a small text, the contrast of the text on the background should be at least 4.5:1 (see https://www.w3.org/TR/WCAG21/#contrast-minimum ) But you provide an alternative through the title attribute, so for me what you propose here is ok.

biou avatar Oct 30 '20 10:10 biou

Good catch, I'll darken the button a bit.

goblindegook avatar Oct 31 '20 00:10 goblindegook

Just one proposal to improve the contrasts a bit with the current version:

    --button-active-background-color: #3f3f3f;
    --button-text-color: #fff;

AlainVagner avatar Jan 10 '21 13:01 AlainVagner