Re: Little bug in a warning message

On 22 Jul 2009, at 09:07, Narrow Code <narrow_code@yahoo.com> wrote:

> a   {
>     color : #123456;
> }
>
> a:hover {
>    color : white;
>    background : #123456;
> }
>
>
>
> I get this warning:
>
> Same colors for color and background-color in two contexts  a:hover  
> and  a
>
> This is not true,

The warning itself is correct; the same value *is* being used for  
'background-color' and 'color' across both type and pseudo class  
declaration blocks.

Whilst it may be a false positive in your case (since you've  
subsequently specified a 'color, value other than what would be  
inherited), the validator has still flagged this as a potential  
accessibility issue, presumably since it doesn't pay attention to any  
subsequent values ('color:white' in your case) that solve the issue  
that it warns about.

> because the "color" attribute is set in "a:hover", and should not be  
> copied from  "a".
>

Received on Thursday, 23 July 2009 07:49:43 UTC