E-mail List Archives
alt text contrast question
From: Sarah Ferguson
Date: Sep 26, 2017 1:38PM
- Next message: Greg Gamble: "Table Scope=row"
- Previous message: Sarah Ferguson: "Re: best practices in accessibility coding questions"
- Next message in Thread: Ben Regis: "Re: alt text contrast question"
- Previous message in Thread: None
- View all messages in this Thread
one more question from our developer (hopefully the last for a while):
Is there any reason this might be bad practice for accessibility:
adding a copy of the alt text as a child pseudo-element of the image
(img::after {content: attr(alt);}) and styling this copy using CSS. The
"true" alt text is in the HTML but is not styled. The copy was hidden by
the image and would only be seen if images were off. The copy overlaid the
alt text itself so with images off, you'd only see the copy. This mechanism
allowed for a black background mask behind white text, which would always
show up. We did this because with images off, some alt text was not high
contrast enough.
thanks
- Next message: Greg Gamble: "Table Scope=row"
- Previous message: Sarah Ferguson: "Re: best practices in accessibility coding questions"
- Next message in Thread: Ben Regis: "Re: alt text contrast question"
- Previous message in Thread: None
- View all messages in this Thread