W3C home > Mailing lists > Public > public-pfwg@w3.org > February 2014

Re: Effect of role=presentation on img elements with svg

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Tue, 4 Feb 2014 03:16:43 +0100
To: James Craig <jcraig@apple.com>
Cc: public-pfwg@w3.org, Bryan Garaventa <bryan.garaventa@whatsock.com>, Steve Faulkner <faulkner.steve@gmail.com>, Joanmarie Diggs <jdiggs@igalia.com>, Cynthia Shelly <cyns@microsoft.com>, "T.V Raman" <raman@google.com>, "Gunderson, Jon R" <jongund@illinois.edu>, Jason White <jason@jasonjgw.net>
Message-ID: <20140204031643919121.6d5797fd@xn--mlform-iua.no>
James Craig, Mon, 03 Feb 2014 17:45:02 -0800:
> On Feb 3, 2014, at 5:18 PM, Leif Halvard Silli:
>> James Craig, Mon, 03 Feb 2014 15:29:24 -0800:
>>> On Feb 3, 2014, at 3:07 PM, Leif Halvard Silli  wrote:
>>> 
>>>> The challenge is that the @src attribute doesn’t represent ”child 
>>>> nodes”.
>>> 
>>> It does for <iframe>. It only hasn’t for <img> because most images 
>>> are flattened raster data.
>> 
>> Why don’t you count @src as ”implicit native role semantic”?
>> 
>> Presentation role flattens ”implicit native role semantics”. But how do 
>> we decide what an element’s ”implicit native role semantics” are? The 
>> @alt attribute is not unique to <img>, so uniqueness is not the 
>> criteria. 
>> 
>> Or consider the this script element. If @src is not part of script’s 
>> implicit native semantics, should I then fear that applying 
>> role="presentation" would cause AT to start reading the file referenced 
>> by the script element?
>> 
>>   <script aria-hidden="false" style="display:block"
>>           role=presentation src=file></script>
> 
> Good question, and I think I have a good answer for you.
> 
> They are still sufficiently different because the @src contents of 
> <iframe> and <img> are displayed, where as the @src contents of the 
> <script> element will never be displayed […]

So it is the result that matters. Not the attribute.

> I don’t think role="presentation” on <video> or <audio> should 
> flatten the shadow DOM contents. For example, native captions are 
> displayed by WebKit as a shadow DOM descendant of the <video> 
> element. Why should these descendant elements be treated any 
> differently than any other descendant elements?

OK. I also see that HTML5 doesn’t say, anymore that *all* elements can 
take role=presentation. And in light of this discussion, I understand 
that better.

But as for <img>, since an image can be so many things, more than a 
name change is needed to make authors understand that 
role="presentation" silences a JPEG image, but not necessarily a SVG 
image.
 
> If you actually want to *hide* all the contents (it really sounds 
> like this is what you’re trying to do), aria-hidden or display:none 
> are the best ways to do so.

I will just understand the matter.

>>>> And further, one could argue that @src, just as @alt, is a 
>>>> specific img element feature, and that @srec therefore should be 
>>>> nullified, when img has presentation role. In my view, this makes 
>>>> sense, because the graphic is supposed be presentational for *all* 
>>>> users.
>>> 
>>> I think the core of this debate is still that the name “presentation” 
>>> has historically meant, that the entire sub-tree is devoid of 
>>> semantic meaning, but that’s not what role="presentation" means, 
>>> which is why we’re talking about choosing a new name. There is too 
>>> much historical baggage that comes with that term. 
>>> 
>>> Even here, you’re using <img src="file.svg" role="presentation">  
>>> when you’d get what you want if you just used: either <img 
>>> src="file.svg" alt=""> or <img src="file.svg" aria-hidden="true">
>> 
>> Are you saying that alt="" and aria-hidden="true" are synonyms? 
> 
> No, but in most AT/browser combos, they accomplish the same thing.
> 
>> According to ”the baggage” it is alt="" and role="presentation" that 
>> are synonyms … ?!
> 
> That may be some of the baggage, but personally I do not agree that 
> those two are synonyms either.

Why not partly solve the problems w.r.t. name and misunderstanding by 
telling authors to, for presentational images, use aria-hidden="true" 
rather than role="presentation"?
-- 
leif halvard silli
Received on Tuesday, 4 February 2014 02:17:16 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:35:28 UTC