There is disagreement over the decorative image example code in the spec:
<img src="DecorativeImage" alt="" title="decorative image"
It's is considered by at least one person that it conflicts with WCAG advice:
I would also make these other observations:
1. The HTML5 spec defines use of alt=”” to equal role=presentation so conforming user agents must implement alt=”” the same way as it., role=presentation which removes the img from the accessibility tree it also removes its title attribute content
So this <img alt=”” title=”poot”> should not appear in the accessibility tree same as <img role=”presentation” title=”poot”> does not appear as implemented now.
2. Though the above is not implemented (so it appears in the acc tree) when an image has an alt=”” title text does not get announced in AT (tested in NVDA, but pretty sure it is the case for others) nor does the presence of the image.
3. Use of a title attribute in this case even if it was announced makes no semantic difference as the title is used as the accessible name for the image when an alt is not provided (example: <img title=”poot”>)
4. If the title attribute is used it is presumed that this information should be available to users other than AT users (who don’t get it anyway). It is well know that this is not the case as the title attribute in not device independent accessible as implemented in the vast majority of user agents.
Is this dispute over the @title attribute or over the @longdesc attribute?
IIUC the logic is that because of @alt="", the img element is not in the accessibility tree and therefore @longdesc does not get exposed and is therefore not a good way to mark this up.
This means that if you took away @alt="", the example would make sense, because most AT in this case fill the alt text from the @title value.
Alternatively you can of course completely remove the example, as suggested in the linked email.
(In reply to comment #1)
> Is this dispute over the @title attribute or over the @longdesc attribute?
> IIUC the logic is that because of @alt="", the img element is not in the
> accessibility tree and therefore @longdesc does not get exposed and is
> therefore not a good way to mark this up.
> This means that if you took away @alt="", the example would make sense,
> because most AT in this case fill the alt text from the @title value.
> Alternatively you can of course completely remove the example, as suggested
> in the linked email.
taking alt="" away, leaving only title is non conforming in HTML5 . The only circumstance where alt can be absent and conforming is:
having said that extension specs can include willful violations of HTML5 , but they need to be clearly stated:
"Give the Task Force the authority to create willful violations (overriding of existing specification text) of the HTML5 specification, as long as they are clearly documented as such and communicated."
and it may make sense to modify conformance requirements to take into account the presence of longdesc on an image, but as stated above such violations need to be clearly stated and normative text needs to be provided., which is not the currently the case.
I was just going from implemented reality for the @alt/@title example. I did not mean to suggest that it was a good solution, nor that it is conforming.
I, too, would suggest to remove the example.
Yep. For now I believe this example should be removed.
"It's is considered by at least one person that it conflicts with WCAG advice:
To some extent this bug hinges on the term "decorative". WCAG 2.0 F39 for SC 1.1.1 explains that an image for decoration, spacing or other purpose that has no relevance to the meaning of the document, should have a nul alt attribute.
The third example in the image description extension references a decorative image. The use case being discussed is slightly different though. It refers to images that are not intrinsic to the meaning of the document, but which may still be of interest to users.
F39 is apparently intended to apply to images that have no meaning whatsoever. For example dividing bars, rounded corners etc. It doesn't seem to consider those images that add to the experience of the page, without being a pre-requisite for understanding the meaning of it. For example scenic landscapes, stock photography etc.
We're effectively talking about a different classification of image, those that convey some sense of emotion or atmosphere.
On this basis longdesc is a good mechanism for providing that information, but populating the alt attribute makes sense anyway. Without the alt value to provide a short description of the image, it would take a lot of running around for screen reader users to decide whether they wanted to know anything else about it.
It's worth keeping the example but modifying it to include an alt value.
As editor, I will remove the example, and instead use examples which have valid non-empty alt.
This has been done in the latest version of the editor's draft.