Re: aria-invalid is confusing

Alexander Surkov, Mon, 4 Feb 2013 22:55:28 +0800:
> I would expect that aria-invalid is propagated through children. If
> not then the behavior is rather confusing:
> <div aria-invalid="true">
>   text
>   <span>another text</span>
> </div>
> 
> 'text' is invalid but 'another text' is not.

I agree that it would be confusing if <span> does not inherit from <div 
aria-invalid="true">. But it was not so simple for me to understand 
what the ARIA spec says about this.

Leif H Silli

> On Mon, Feb 4, 2013 at 9:39 PM, Leif Halvard Silli wrote:
>> Alexander Surkov, Mon, 4 Feb 2013 18:43:23 +0800:
>> 
>>> <div aria-invalid="true">
>>>   <span>1st span</span>
>>>   <span aria-invalid="false">2nd span</span>
>>> </div>
>>> 
>>> Both "1st span" and "2nd span" text ranges should have "invalid:false"
>>> text attributes because "if the attribute is not present, or its value
>>> is false then the default value of false applies". It doesn't seem
>>> this behavior in the context of the "1st span" text range is evident
>>> and actually wanted.
>> 
>> Second paragraph in your reference says:[1] "If the value is
>> __computed__ to be invalid".  Question: Doesn't the "1st span" inherit
>> aria-invalid="true" from <div aria-invalid="true">?  If yes, then it is
>> the spec text that is confusing.
>> --
>> [1] http://www.w3.org/WAI/PF/aria/states_and_properties#aria-invalid
> 

Received on Monday, 4 February 2013 16:23:06 UTC