Re: Question - <img role="img" src="someimage.png" alt="ok alternative">

Hi,

I’m just looking to clarify concepts, so they can be explained logically…

You’re saying that <img role=”img”> remains an <img element – when it goes into the algorithm which forms the Accessibility Tree.  

But, https://w3c.github.io/using-aria/#do says “Adding an ARIA role overrides the native role semantics” – which means that the <img role=”img”> must be the same as <div role=”img”> when it goes into the algorithm which forms the Accessibility Tree.  

Which means that unless the algorithm which forms the Accessibility Tree checks the element in addition to the role, there might be issues – and alt could well be ignored.
 
Thoughts?

Alistair
 
---
 
Alistair Garrison
Director of Accessibility Research
Level Access (formerly SSB Bart Group)

On 11/08/2017, 12:09, "Kasper Kronborg Isager" <kki@siteimprove.com> wrote:

    <div role="img"> is indeed different from <img role="img">, but <img role="img"> still remains the same as <img>. A <div> has no host native text alternative attribute or element, whereas an <img> does; its alt attribute. Hence why <img role="img" alt="Text alternative"> is perfectly valid and will result in a accessible name of "Text alternative".
    
    That's my take on it at least.
    
    Kasper Isager
    Software Developer
    
    Siteimprove
    Sankt Annæ Plads 28 | DK-1250 København K
    kki@siteimprove.com
    
    > On 11 Aug 2017, at 12.55, Alistair Garrison <alistair.garrison@levelaccess.com> wrote:
    > 
    > I agree <img has an implied aria-role of “img” – of course.
    > 
    > But, the document does not say <img role=”img” is the same as <img – because, clearly <div role=img is not the same as <img.
    > 
    > <x role=”img” creates a new type of element… 
    > 
    > Thoughts??? 
    > 
    > Alistair
    > 
    > ---
    > 
    > Alistair Garrison
    > Director of Accessibility Research
    > Level Access (formerly SSB Bart Group)
    > 
    > On 11/08/2017, 11:48, "Kasper Kronborg Isager" <kki@siteimprove.com> wrote:
    > 
    >    Hey,
    > 
    >    To weigh in on Tobias' comment, <img ...> is equivalent to <img role="img" ...> as per https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FTR%2Fhtml-aria%2F&data=02%7C01%7Ckki%40siteimprove.com%7C3402ab3d05044ed400ff08d4e0a7707c%7Cad30e5bc301d40dba10a0e8d40abe0f9%7C0%7C0%7C636380457152521396&sdata=onxcTgP6hX12n%2FZo7qPY2V0T3K%2FD%2BWtVeSPCocUpGDk%3D&reserved=0.

    > 
    >    Kasper Isager
    >    Software Developer
    > 
    >    Siteimprove
    >    Sankt Annæ Plads 28 | DK-1250 København K
    >    kki@siteimprove.com
    > 
    >> On 11 Aug 2017, at 12.40, Alistair Garrison <alistair.garrison@levelaccess.com> wrote:
    >> 
    >> Hi,
    >> 
    >> The issue, though, if I understand the spec is that the element is no longer an HTML IMG element – as, it has been re-rolled as an ARIA “Custom” HTML element of type “img”.  
    >> 
    >> Which means, or should mean, that the alt attribute is no longer considered to be a natural attribute of this ARIA “Custom” HTML element of type “img”.  So, step D, in the Acc Name Calc does not apply…
    >> 
    >> Thoughts?
    >> 
    >> Alistair
    >> 
    >> ---
    >> 
    >> Alistair Garrison
    >> Director of Accessibility Research
    >> Level Access (formerly SSB Bart Group)
    >> 
    >> From: Tobias Christian Jensen <tcj@siteimprove.com>
    >> Date: Friday, 11 August 2017 at 11:29
    >> To: Wilco Fiers <wilco.fiers@deque.com>, Alistair Garrison <alistair.garrison@levelaccess.com>
    >> Cc: Accessibility Conformance Testing <public-wcag-act@w3.org>
    >> Subject: RE: Question - <img role="img" src="someimage.png" alt="ok alternative">
    >> 
    >> Hi,
    >> 
    >> A good question. I did not immediately have an answer, but Kasper pointed out to me that according to the spec here:https://www.w3.org/TR/accname-aam-1.1/#terminology (section 2.D) the Alt attribute will be correctly outputted as the Accessible Name, since no aria-label, aria-labelledby or aria-describedby are set.
    >> 
    >> /Tobias
    >> 
    >> From: Wilco Fiers [mailto:wilco.fiers@deque.com] 
    >> Sent: 11. august 2017 12:16
    >> To: Alistair Garrison <alistair.garrison@levelaccess.com>
    >> Cc: Accessibility Conformance Testing <public-wcag-act@w3.org>
    >> Subject: Re: Question - <img role="img" src="someimage.png" alt="ok alternative">
    >> 
    >> Hi Alistair,
    >> I don't see why that should be a violation, unless there are AT that don't support it, in which case it's an accessibility support question. My take on things generally is that if it works in AT, it passes, regardless of what the specs say. WCAG doesn't tell you to follow specs, it tells you to make something that works in AT.
    >> 
    >> Wilco
    >> 
    >> On Fri, Aug 11, 2017 at 10:21 AM, Alistair Garrison <alistair.garrison@levelaccess.com> wrote:
    >> Hi,
    >> 
    >> <img role="img" src="someimage.png" alt="ok alternative">
    >> 
    >> I wanted to gain reaction from the ACT TF with regard to this piece of code.  Assume the alt text is a verified ok alternative description for the image.
    >> 
    >> The question being – does this element have a valid or invalid mechanism for calculating an Accessible Name (with regard to a strict interpretation of aria, with no heuristic guessing)?
    >> 
    >> Very interested to hear thoughts / comments
    >> 
    >> Alistair
    >> 
    >> ---
    >> 
    >> Alistair Garrison
    >> Director of Accessibility Research
    >> Level Access (formerly SSB Bart Group)
    >> 
    >> 
    >> 
    >> 
    >> -- 
    >> Wilco Fiers
    >> Senior Accessibility Engineer - Co-facilitator WCAG-ACT - Chair Auto-WCAG
    >> <image001.gif>
    > 
    > 
    > 
    
    

Received on Friday, 11 August 2017 12:57:17 UTC