Re: suggestions for new roles and properties in ARIA next

On Apr 20, 2011, at 4:43 PM, Leif Halvard Silli wrote:

> Would also you say that @title - of img as well as of input - looses 
> its role as title attribute and becomes inaccessible if the element is 
> given another role than the default one?

No. @title applies to every role in HTML. See text alt computation rule 2D.
http://www.w3.org/TR/wai-aria/roles#textalternativecomputation

> If @alt is *fallback* (in addition to alternative text), then the @alt 
> does not disappear just because the element gets another role. And 
> HTML5's current definition of @alt is that it *is* fallback. (This was 
> just changed in a Desision, which states that the @alt text is 
> alternative text. However it is clear that it is technically fallback 
> and semantically alternative text.)

I think that's probably acceptable then. Here's the relevant part from the text alt computation (rule 2A bullet 3).

>From the spec:
>> If aria-labelledby and aria-label are both empty or undefined, and if the element is not marked as presentational (role="presentation"), check for the presence of an equivalent host language attribute or element for associating a label, and use those mechanisms to determine a text alternative. For example, in HTML, the img element's alt attribute defines a label string and the label element references the form element it labels. See How to Specify Alternate Text ([HTML], section 13.8) and HTML 5 Requirements for providing text to act as an alternative for images([HTML5], section 4.8.1.1).


There are a few places this does not apply though. For example:

An HTML 5 image:
<img alt="This is valid fallback content, which is used as the label.">

An ARIA presentational element:
<img role="presentation" alt="This is invalid fallback content">

The second would be considered an author error. 

> VoiceOver IMO support this interpretation. Just run the following Test 
> 1 and Test 2 in VoiceOver:
> 
> 	<p>Test 1: <img src="x.jpg" aria-labelledby="y" >
> 	<img src="y.jpg" id="y" alt="Y, y, y?" >
> 	<p>Test 2: <img src="x.jpg" aria-labelledby="yy" >
> 	<img src="y.jpg" id="y" aria-label="Therfore!" >
> 
> You will see that for Test 1, then the first image takes is label from 
> the second image's @alt text. But in Test 2, this does not happen.

I think you have some errors in that example.

1. The role has not been overridden, so I don't see the relevance.
2. The reason example #2 doesn't work is because you are using a IDREF 'yy' that does not exist in the DOM.

Received on Thursday, 21 April 2011 00:14:18 UTC