?
avatar chmst
chmst
15 Aug 2020

Steps to reproduce the issue

Try to login with a wrong password.
You will get a warning.
Check the site with AXE of WAVE or your favourite a11y check tool.

Expected result

No contrast error

Actual result

The warning / text combination has a contrast ratio of about 1.7.

avatar chmst chmst - open - 15 Aug 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Aug 2020
avatar brianteeman
brianteeman - comment - 15 Aug 2020

Are you referring to logging in to the admin or to the site?

avatar chmst
chmst - comment - 15 Aug 2020

It is for both. Defined in the webcomponent for alerts.

avatar Quy
Quy - comment - 15 Aug 2020

Duplicate #29174?

avatar chmst
chmst - comment - 15 Aug 2020

#29174 should be resolved now. If I understand right, it addresses the alerts in bootstrap and meanwhile they have good contrast ratio. #27369

screen shot 2020-08-15 at 14 17 58

My issue is caused by messages of type warning from the system, this is undpendent from client.

screen shot 2020-08-15 at 14 17 58


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30375.

avatar infograf768
infograf768 - comment - 15 Aug 2020

AFAIK it is defined in atum and cassiopea since #30294 by
Atum /administrator/templates/atum/scss/vendor/joomla-custom-elements/joomla-alert.scss
and similar for Cassiopea

&[type="warning"] {
    --alert-accent-color: var(--warning);
  }

in Atum
var(--warning) equals $yellow in variables.
and $yellow: #ffb514; //used in bootstrap

and in Cassiopea by
var(--warning) equals $yellow in variables.
and $yellow: #f0ad4e;

Therefore a small difference for the $yellow which could be normalised and modified if needed.

avatar infograf768
infograf768 - comment - 15 Aug 2020

We could use as color #cd7b07 which would give a correct contrast
Screen Shot 2020-08-15 at 18 58 40

What do you think?

avatar chmst
chmst - comment - 15 Aug 2020

It is an issue in frontend and backend. Your proposal looks good.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30375.

avatar infograf768
infograf768 - comment - 15 Aug 2020

Now remains to decide if we use a new color directly for $warning or modify the $yellow in variables for each template.
I am not a specialist of a11y and css. I leave this to whoever is.

avatar infograf768
infograf768 - comment - 15 Aug 2020

Hmm
It looks like Wave does not agree with https://webaim.org/resources/contrastchecker/ and firefox own contrast check

I modified here the text color for the Warning title to get black on the existing yellow instead of modifying the $yellow
I get

Screen Shot 2020-08-15 at 20 01 13

and contrastchecker agrees

Screen Shot 2020-08-15 at 20 02 31

Who should we believe?

Modifcations in the scss to get black text for warning are easy. Just create a new variable var(--alert-heading-text) and adapt to warning type

  .alert-heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: center;
    padding: .8rem;
    color: var(--alert-heading-text);
    //color: rgba(255, 255, 255, .95);
    background: var(--alert-accent-color, transparent);
  }

  .alert-link {
    color: var(--success, inherit);
  }

  &[type="success"] {
    --alert-accent-color: var(--success);
    --alert-heading-text: rgba(255, 255, 255, .95);
  }

  &[type="info"] {
    --alert-accent-color: var(--info);
    --alert-heading-text: rgba(255, 255, 255, .95);
  }

  &[type="warning"] {
    --alert-accent-color: var(--warning);
    --alert-heading-text: #000;
  }

  &[type="danger"] {
    --alert-accent-color: var(--danger);
    --alert-heading-text: rgba(255, 255, 255, .95);
  }
avatar infograf768
infograf768 - comment - 15 Aug 2020

I rather believe contrastchecker and Firefox check.
Will do PR to change text to black for the Warning.

It is what Brian did anyway here: #27369

avatar brianteeman
brianteeman - comment - 15 Aug 2020

Thanks for reverting to my original code

Odd that Wave does not agree with https://webaim.org/resources/contrastchecker/ because they are both made by webaim

avatar chmst
chmst - comment - 15 Aug 2020

It is one of these things which drive me crazy

Odd that Wave does not agree with https://webaim.org/resources/contrastchecker/ because they are both made by webaim

avatar infograf768
infograf768 - comment - 15 Aug 2020

Thanks for reverting to my original code

It is not really a revert as the code to get the present results is quite different.
Just something forgotten for the warning case.

avatar infograf768 infograf768 - change - 16 Aug 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-08-16 05:19:47
Closed_By infograf768
avatar infograf768 infograf768 - close - 16 Aug 2020
avatar infograf768
infograf768 - comment - 16 Aug 2020

Please test #30382
Closing as we have a patch

Add a Comment

Login with GitHub to post a comment