Last Comment Bug 1027018 - HTML5 implement alt="" as role=presentation
: HTML5 implement alt="" as role=presentation
Status: NEW
:
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: x86_64 Windows 8.1
-- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: alexander :surkov
Mentors:
Depends on:
Blocks: html5a11y
  Show dependency treegraph
 
Reported: 2014-06-18 04:52 PDT by steve faulkner
Modified: 2015-06-04 06:08 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description User image steve faulkner 2014-06-18 04:52:24 PDT
The HTML spec[1] requires an img element with an empty alt (alt="") to be mapped to role=presentation


 Firefox does not currently implement this (webkit does)[2], please do 

[1]http://www.w3.org/html/wg/drafts/html/master/dom.html#sec-strong-native-semantics
[2]http://stevefaulkner.github.io/html-mapping-tests/
Comment 1 User image alexander :surkov 2014-06-19 07:44:44 PDT
note, we had in the past bug 485181: same request, different context
Comment 2 User image alexander :surkov 2014-06-19 11:36:10 PDT
I agree that role="presentation" is semantically correct to describe <img alt=""> but it doesn't go with existing API mapping (see Marco's comment in bug 485181). I don't see benefits to change API mapping. So I'd rather change the spec.

I'm not quite sure that having role="presentation" in the spec puts any requirements for the API mapping. If it doesn't then I'd say the spec should fit API mapping to existing implementation. If it does then perhaps img@alt="" shouldn't equal to role="presentation"
Comment 3 User image steve faulkner 2014-06-20 01:57:00 PDT
(In reply to alexander :surkov from comment #2)

> I'm not quite sure that having role="presentation" in the spec puts any
> requirements for the API mapping. If it doesn't then I'd say the spec should
> fit API mapping to existing implementation. If it does then perhaps
> img@alt="" shouldn't equal to role="presentation"

the requirement is that <img> is treated the same as any element with role=presentation implementation wise, so you should do whatever you do with <header role=presentation>text</header> for example. 

What happens when you have <header role=presentation aria-label="blah">text</header>?
Comment 4 User image alexander :surkov 2014-06-20 09:22:13 PDT
(In reply to steve faulkner from comment #3)

> the requirement is that <img> is treated the same as any element with
> role=presentation implementation wise, so you should do whatever you do with
> <header role=presentation>text</header> for example. 

ok, then perhaps HTML a11y needs a better match

> What happens when you have <header role=presentation
> aria-label="blah">text</header>?

I think the spec requires us no accessible for header and Firefox does this (I didn't check though). But I don't see how it's related.
Comment 5 User image Marco Zehe (:MarcoZ) 2015-06-04 06:08:25 PDT
To be clear, my comment in bug 485181 was specifically referring to images with a missing alt attribute. I'm fine if only img @alt="" gets role "presentation", as long as an image with a *missing* alt attribute is not covered by this, since it might be an important image which is just subject to authoring error.

Note You need to log in before you can comment on or make changes to this bug.