Re: suggestions for new roles and properties in ARIA next

On Apr 20, 2011, at 6:22 PM, Leif Halvard Silli wrote:

> So seems we agree about this, then. :-) 

:-)

> Should ARIA say that @alt is also global in nature, even if it is 
> invalid on most elements?

No. The reason @title works (in HTML) is because it's valid on all UI elements. Anyway, ARIA wouldn't mention @alt specifically because the spec is intended to be host language neutral. The normative text says "an equivalent host language attribute or element for associating a label" and "last resort is to use text from a tooltip…" It only mentions HTML @alt and @title as examples; it's up to the host language spec (HTML, SVG, MathML, etc) to determine what those attributes are.

> Remember that it also exists on <area>. When 
> I did some tests last year, it seemed as if one could add @alt on any 
> element, and them most ARIA supporting AT would pick that up. (Clearly, 
> per HTML5's definition, @alt is only fallback in the elements where it 
> is permitted.)

That's likely to be very inconsistent between UA and AT implementations, and you should NOT rely on it working. All rendering engines use heuristics to repair broken markup. In the same way, most browsers do a reasonable job of rendering HTML, even if the page source is invalid tag soup. 

> It was always a problem for me to understand the place of @alt in ARIA. 

Again, ARIA is intended to be host language neutral, in much the same way that WCAG 2.0 does a good job of being technology neutral. Instead of using the term "alt attribute", the ARIA spec uses generic verbiage like "an equivalent host language attribute or element for associating a label" because the alt attribute does not exist in most other languages besides HTML.

> Because, ARIA describes @alt more or less as @aria-label. But it is 
> also clear (but not clear from ARIA) that @alt has features that 
> @aria-label don't have (the most important being that it is fallback).

You're reading too much into it. See below.

>>> 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="yy" aria-label="Therefore!" >
>>> 
>>> 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.

Actually that's just a bug in WebKit. Thanks for finding it. It's in the tracker now.

Received on Thursday, 21 April 2011 04:08:58 UTC