HTML5 implement alt="" as role=presentation

NEW
Unassigned

Status

()

Core
Disability Access APIs
3 years ago
2 years ago

People

(Reporter: steve faulkner, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
x86_64
Windows 8.1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
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/

Updated

3 years ago
Blocks: 389237
Component: Disability Access → Disability Access APIs
Product: Firefox → Core
Version: unspecified → Trunk

Comment 1

3 years ago
note, we had in the past bug 485181: same request, different context

Comment 2

3 years ago
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"
(Reporter)

Comment 3

3 years ago
(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

3 years ago
(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

2 years ago
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.
You need to log in before you can comment on or make changes to this bug.