Re: HR TAG, HEADING TAG, AND COLOR CONTRAST/AAA 1.4.6

Chris Reeve wrote:
> I have a hr tag on my website. According to several sites an hr tag 
> needs a color, and a background-color in the style sheet. My 

hr *elements* don't need a colour in the style sheet.  They are the same 
as body text in that respect.  If you do specify a colour, you need to 
ensure that there is a compatible background colour.  Given the normal 
rendering for hr, that will need to be specified on a parent element, 
not the hr element, itself.

I would think it acceptable to use a rather lower colour contrast for hr 
than for body text, given the large size of the typical rendering, and 
its relatively low semantic importance.  However you would not want such 
a low contrast that someone with poor vision was in doubt as to whether 
there was something there.

Depending on the context, hr might come under the "incidental" 
dispensations.  Otherwise, I think G18 would be sufficient.

> headings also have a background-color. Can I use color with these tags 
> and comply with 1.4.6? If so, how?

If you change the background colour, you must change the foreground 
colour.  I would not advise specifying colours on just headers.
>  
> The color is specified in my associated style sheet, but fails statement 
> G148, however it passes, G17, and G18. I have not attempted G174 and 
> cannot test G174.

Although I would consider G174 a poor second choice, as users with poor 
vision don't want to be continually activating controls to make the page 
readable, I don't really see how you could not test it.  It simply says, 
if the page doesn't have enough contrast otherwise, make sure that there 
is a control on the page that users with poor vision can easily find, 
that allows them to make the whole page easy to read.

>  
> In my current status the header and hr tag are the only elements I use 
> for color. What is my pass/fail status on 1.4.6?

Whilst it might be OK from an accessibility point of view, the reason 
for requiring setting both background and foreground is that the user 
may not be using black on white, so, from a visual design point of view, 
if you set colours on the headers, you should set colours on everything. 
  You need to specify background colour on the surrounding box for the 
HR, as no background, or negligible background may be rendered on the HR 
itself.

>  
> Can you suggest how to improve the hr tag and headers for 1.4.6?
> 
> 


-- 
David Woolley
Emails are not formal business letters, whatever businesses may want.
RFC1855 says there should be an address here, but, in a world of spam,
that is no longer good advice, as archive address hiding may not work.

Received on Tuesday, 28 July 2009 07:29:51 UTC