W3C home > Mailing lists > Public > wai-xtech@w3.org > April 2012

Fwd: Re: Alternative to @aria-describedAT: <a role=img>

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Mon, 9 Apr 2012 20:28:40 +0200
To: wai-xtech <wai-xtech@w3.org>
Message-ID: <20120409202840547648.914f15cf@xn--mlform-iua.no>
[Forwarded - because sender use incorrect list address.]

----- Begin forwarded message -----
From: Alexander Surkov <surkov.alexander@gmail.com>
Date: Mon, 9 Apr 2012 23:27:23 +0900
Subject: Re: Alternative to @aria-describedAT: <a role=img>

Hi, Leif. Please find my answers inline.

>> Also look at:
>> "user agents MUST use the semantic of the WAI-ARIA role for
>> processing, not the native semantic, unless the role requires WAI-ARIA
>> states and properties whose attributes are explicitly forbidden on the
>> native element by the host language"
> 
> So what this text says is, that in the case of <a role=img href>, then
> there is no "MUST use the semantic of the WAI-ARIA role". Why is there
> no MUST? Answer: Because HTML5 - currently - explicitly disallows
> role="img" for the <a> element.

I might miss something but ARIA implementation guide says about
WAI-ARIA states and properties (not about roles). So even if HTML 5
disallows role="img" for the <a> then ARIA implementation guide
requires UA to ignore <a> native semantics. But I would love to see
ARIA implementation guide respecting what HTML5 says.

>> It sounds reasonable with me if ARIA would add or extend native
>> semantics rather than completely remove it. From the user/web author
>> point of view I don't see any benefits that AT users see an image but
>> sighted users see a normal link.
> 
> HTML5 already disagrees with you: It allows role=presentation on both
> <a> and <img>.

I didn't mean anything about role=presentation since it's sort of
special role ('role' term might be not a good term for this mechanism
at all). Anyway sorry if my words made you think this way.

> Also, when a link wraps around an image, then sighted
> users don't see "a normal link" — they see an image. Only when they
> hover around - or click - the image, do they see the link.

You need to keep in mind that what AT users see and what UA exposes to
AT are different things. Originally ARIA implementation guide requires
UA to remove native semantics in case of <a role=img href> and
therefore it means UA can't expose actions in this case what means the
AT user is not able to click this image at all via AT API. That was a
problem I referred to.

> Example: Om CNN.com today, each news story is presented like this:
> 
> <div><a href="LinkURL"><img src="URL" alt=""></a>
> <a href="LinkURL">Veteran reporter Wallace remembered</a></div>
> 
> Question: Why - in your opinion - do the AT user need to perceive the
> first link above as a link?

Because it's a link I guess. On the web it seems the user started to
think that any image can be a link and he tends to click on it when he
needs details. But probably I don't care a lot how the user perceives
some markup. In general I care about how UA should expose this markup
to AT. But there's nothing interesting from mapping to AT point of
view in this case.

> Already today, HTML5 permits us make the
> link presentational. And so, what is the difference between making it
> presentational and making it a an image?

Perhaps it's out of scope of this discussion but you should keep in
mind that link can't be presentational because it's focusable.

Thanks.
Alex.


On Mon, Apr 9, 2012 at 10:37 PM, Leif Halvard Silli
<xn--mlform-iua@xn--mlform-iua.no> wrote:
> Alexander Surkov, Mon, 9 Apr 2012 11:51:48 +0900:
> 
>> <a role=img href> is a real edge case and it doesn't sound a good ARIA
>> use case. See
>> http://www.w3.org/WAI/PF/aria-implementation/#mapping_conflicts

>> "WAI-ARIA roles, states, and properties are intended to add semantic
>> information when native host language elements with these semantics
>> are not available, and are generally used on elements that have no
>> native semantics of their own."
> 
> Question: Are you sure that <a role=img href> is something HTML has -
> without role=img? (See below.)
> 
>> Also look at:
>> "user agents MUST use the semantic of the WAI-ARIA role for
>> processing, not the native semantic, unless the role requires WAI-ARIA
>> states and properties whose attributes are explicitly forbidden on the
>> native element by the host language"
> 
> So what this text says is, that in the case of <a role=img href>, then
> there is no "MUST use the semantic of the WAI-ARIA role". Why is there
> no MUST? Answer: Because HTML5 - currently - explicitly disallows
> role="img" for the <a> element.
> 
>> <a role="img" href> is not described case but the most interesting
>> part that ARIA doesn't require to ignore the native semantics blindly.
> 
> Yes, it *does* require to ignore the native semantics "blindly" (as in
> "MUST), *if* the host language permits it. HTML5 already permits the
> following roles for the <a> element:
> 
> Role must be either link, button, checkbox, menuitem, menuitemcheckbox,
> menuitemradio, tab, or treeitem.
> 
> See: http://www.w3.org/TR/html5/wai-aria.html#table-aria-weak

> 
> Also note that HTML5 says: "In addition, any element may be given the
> presentation role, regardless of the restrictions below."
> 
>> It sounds reasonable with me if ARIA would add or extend native
>> semantics rather than completely remove it. From the user/web author
>> point of view I don't see any benefits that AT users see an image but
>> sighted users see a normal link.
> 
> HTML5 already disagrees with you: It allows role=presentation on both
> <a> and <img>. Also, when a link wraps around an image, then sighted
> users don't see "a normal link" — they see an image. Only when they
> hover around - or click - the image, do they see the link.
> 
> Example: Om CNN.com today, each news story is presented like this:
> 
> <div><a href="LinkURL"><img src="URL" alt=""></a>
> <a href="LinkURL">Veteran reporter Wallace remembered</a></div>
> 
> Question: Why - in your opinion - do the AT user need to perceive the
> first link above as a link? Already today, HTML5 permits us make the
> link presentational. And so, what is the difference between making it
> presentational and making it a an image?
> 
> For example, imagine that the above <img> did not have an empty @alt
> but one which said "Studio photo of a slightly younger Mike Walace."
> 
> In fact John Foliot discusses a similar case here:
> <http://john.foliot.ca/aria-hidden>. Though John only discusses it from
> a duplicate links perspective. Like I described above, the image might
> be good in itself, but unclear as a "link image". In which case *one
> way* to remove the confusion can be through doing <a role=img>.
> --
> Leif Halvard Silli
Received on Monday, 9 April 2012 18:29:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 13:16:16 GMT