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

Very interesting discussion. We have had several discussion on the subject 
without a clear resolution.
As Shadi has pointed out what is not clear in the spec is how implicit and 
explicit role for img should be handled as mentioned below -
Is <div role="img"> same as <img role="img"> and i think it is as the 
explicit role="img" takes precedence (the alt may get ignored, needs 
aria-label or aria-labelledby) but this is not same as <img 
src="someimage.png" alt="ok alternative"> IMHO as the role of img is 
implied here and does not take precedence.

My few cents.

Warm regards,

Charu Pandhi
---------------------------------------
Accessibility Tooling and Automation lead
IBM Accessibility Research
 (512) 286 6370, T/L 363 6370 
Find me on linkedin / twitter
http://w3.ibm.com/able   http://www.ibm.com/able

 VP, SWE Austin, Texas




From:   Stein Erik Skotkjerra <ses@siteimprove.com>
To:     Alistair Garrison <alistair.garrison@levelaccess.com>, "Kasper 
Kronborg Isager" <kki@siteimprove.com>
Cc:     Tobias Christian Jensen <tcj@siteimprove.com>, Wilco Fiers 
<wilco.fiers@deque.com>, Accessibility Conformance Testing 
<public-wcag-act@w3.org>
Date:   08/11/2017 08:23 AM
Subject:        Re: Question - <img role="img" src="someimage.png" alt="ok 
   alternative">



Hi, Alistair,
This is an interesting question. I agree with your logics. However quick 
tests shows that browsers seem to handle this – I guess by, as you 
suggest, checking if the ARIA role is the same as the original role of the 
element and therefore ignoring it.


 
Stein Erik Skotkjerra
Lead Accessibility Strategist
 
 <http://siteimprove.com/da/>
 
Sankt Annæ Plads 28  |  DK-1250 København K
ses@siteimprove.com
 
Facebook <https://www.facebook.com/Siteimprove>   Twitter <
https://twitter.com/SiteimproveEuro>   LinkedIn <
https://www.linkedin.com/company/siteimproveuk>
 
Unsubscribe <
http://go.siteimprove.com/hs/manage-preferences/unsubscribe-simple>

On 11/08/2017, 14.57, "Alistair Garrison" 
<alistair.garrison@levelaccess.com> wrote:

    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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw3c.github.io%2Fusing-aria%2F%23do&data=02%7C01%7Cses%40siteimprove.com%7C57a879ba2d38400555a008d4e0b882cc%7Cad30e5bc301d40dba10a0e8d40abe0f9%7C0%7C0%7C636380530468421449&sdata=ShHiJU2th1dJp7Ce0AH2Nh%2FDGJKntjF1tRup1Es%2FZrI%3D&reserved=0 
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 Monday, 14 August 2017 14:26:25 UTC