Re: Default role of <IMG> should be "img"

Benjamin Hawkes-Lewis, Sun, 12 Sep 2010 14:24:08 +0100:
> On 12 Sep 2010, at 13:27, Maciej Stachowiak wrote:
>> ARIA roles only affect what is reported to AT, so opening this 
>> broader question isn't particularly relevant to the default role of 
>> the <img> element (if any).
>> 
>> It's important to realize that the ARIA role is a construct that 
>> exists solely for assistive technologies.
> 
> Are you really saying that it's okay if default accessibility API 
> mappings differ from what elements communicate generally? I think 
> that would be fairly incoherent.

When it comes to <img>, then Firefox is alone in "blending" the @alt 
text into the text flow when the img src URL is not available. Other 
GUI browser make the reader aware of the lacking image via a 
frame/border around the lacking image. I do like the Firefox way better 
than the other ways @alt text is handled. But HTML5 doesn't require UAs 
to work as Firefox. 

Lynx also has an interesting way: it gives @alt text a different color 
- that's probably actually better than what Firefox does.

AT does not need to announce "image", e.g. screenreaders could follow 
Lynx' pattern and just "color/pitch" the alt text a little different 
from other text that it presents. 

(Speaking about Lynx: Lynx also treats alt="<empty-string>" and 
alt="<whitespace>"  the same way, namely: both are replaced with a 
space character - I like that as well, it could work well if all GUI 
browsers worked like Firefox.)

A problem with <img role="presentation" alt=" Foo. "> is that it makes 
the AT not read the @alt text. It would have been practical if, 
instead, role="presentation" would simply make the AT read the @alt 
text as text - and not announce "Image". 

For example Steve suggests that a <h1> inside a <hgroup> should default 
to role="presentation" - which simply means that the the <h1> isn't 
announced as a header, it does not mean that the <h1> is hidden. 
Currently the only way to avoid that an <img> is announced as <img> is 
to set it the @alt to alt="<empty-string>". 

So rather than saying that an <img src="*" alt="<none-empty>" should 
not be treated as role="img", we should change how  <img 
role="presentation" src="*" alt="<none-empty>">  is treated. 

I have not verified what ARIA says about <img role="presentation" 
src="*" alt="<none-empty>"> - does  it require the @alt text to be 
hidden?
-- 
leif halvard silli

Received on Sunday, 12 September 2010 13:46:07 UTC