Closed Bug 1027018 Opened 10 years ago Closed 2 years ago

HTML5 implement alt="" as role=presentation

Categories

(Core :: Disability Access APIs, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1748585

People

(Reporter: faulkner.steve, Unassigned)

References

(Blocks 1 open bug)

Details

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/
Blocks: html5a11y
Component: Disability Access → Disability Access APIs
Product: Firefox → Core
Version: unspecified → Trunk
note, we had in the past bug 485181: same request, different context
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"
(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>?
(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.
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.

I filed bug 1748585 before I realised this one existed. Closing this in favour of that, since it has some additional modern context.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.