- From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
- Date: Thu, 21 Apr 2011 01:43:26 +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 11:05:55 -0700:
> On Apr 20, 2011, at 3:56 AM, Steve Faulkner wrote:
>>>> Seconded, but this example would probably need aria-label, because
>>>> overriding the img role means the alt attribute is now
>>>> meaningless. Agreed?
>>
>> My thinking is that for graphical user agents its still an image, and
>> it will still need alt for that purpose. also they generally map alt
>> to the accessible name property in APIs, so why require an additional
>> aria-label that does the same thing?
>
> For the same reason that I would expect this to not work:
> <input type="button" role="text" value="Foo">
> <input type="checkbox" role="text" checked>
>
> Like alt, the value and checked attributes are specific to defined
> HTML roles, which have been specifically overridden here. If it's no
> longer an image, button, or checkbox, none of the image, button, and
> checkbox attributes apply anymore.
FIRSTLY:
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?
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.)
If @alt would become inaccessible just because the element got another
role, then it meant that @alt had something to do with the img
element's primary function - the image functionality. But since @alt is
fallback, @alt's role does not disappear by a role change.
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.
SECONDLY:
To stay focused, we should look at Steve's original example:
My <img src="heart.png" alt="heart" role="text"> breaks.
That example is very similar to what you will find as Vlad's site
(http://rebuildingtheweb.com) when he explains his idea that the @alt
should be seen as a textual substitute for the image. Except that
Vlad's typical example looks like this:
I <img src="heart.png" alt="love" > you!
(http://rebuildingtheweb.com/en/how-browsers-export-alt-text)
In neither case does the image represent text. It instead represents a
symbol which acts as a stand-in for a very specific word. Technically,
the author could filled the @alt text with a Unicode symbol for the
heart instead (♡) and let the reader interpret what it means.
Steve, what is the behaviour you expect from applying role=text? I
would have assumed that the main purpose you have is that the AT should
not announce that it is a image but rather just read the @alt text.
>>> Associated how? aria-describedby? aria-labelledby? If so, why is
>>> the role necessary? This reminds me of the label role that was
>>> previously removed from ARIA.
>>
>> I would think the relationship can be implemented in the browser
>> if a table has a child caption = accessible name
>> if a figure has a child caption = accessible name
>>
>> the usefulness of the role would be in being able to identify the
>> caption as a caption, especially for images in figure
>
> But a caption for a table or image is just the label for the table or
> image. The extra role wouldn't matter.
>
> This is a lot like the old label role, which may have been in the
> original ARIA proposal, but I couldn't find reference to in old
> versions of the spec. In any case, it was removed because it was
> deemed unnecessary. I was in the group then, but this pre-dated me
> taking the editor role, so I'm not sure where to look.
The <figure> cannot be used inline - in a p element. So if you want to
caption an inline image, then you must use aria-labelledby. Of course,
one can use aria-labelledby. But a solution which uses role=caption
seems more robust. E.g. it doesn't break because the value of the @id
changes, or something like that.
--
Leif H Silli
Received on Wednesday, 20 April 2011 23:44:00 UTC