- From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
- Date: Thu, 21 Apr 2011 03:22:56 +0200
- To: James Craig <jcraig@apple.com>
- Cc: Steve Faulkner <faulkner.steve@gmail.com>, W3C WAI-XTECH <wai-xtech@w3.org>, Richard Schwerdtfeger <schwer@us.ibm.com>, Michael Cooper <cooper@w3.org>
James Craig, Wed, 20 Apr 2011 17:13:50 -0700: > On Apr 20, 2011, at 4:43 PM, Leif Halvard Silli wrote: > 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. 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? 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.) > 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). I don't quite grok whether that rule supports what we agree about ... It was always a problem for me to understand the place of @alt in ARIA. 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). > 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. Basically, yes. >> 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. Relevance: The tests were only meant to demonstrate that @alt is technically fallback content. So, in Test 1, if you replace the second img element with a <object> element with the same @id value, then the fallback of <object> will be used. > 2. The reason example #2 doesn't work is because you are using a > IDREF 'yy' that does not exist in the DOM. Sorry. Just correct the @id value (or the idref in @aria-labelledby), and you will see that it works as I said. -- leif halvard silli
Received on Thursday, 21 April 2011 01:23:30 UTC