This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 21565 - Should it be an error to use @longdesc on presentational images? And/Or should it _affect_ the role of the image?
Summary: Should it be an error to use @longdesc on presentational images? And/Or shoul...
Status: RESOLVED MOVED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML Image Description Extension (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Charles McCathieNevile
QA Contact: HTML WG Bugzilla archive list
URL: http://www.w3.org/TR/2013/WD-html-lon...
Whiteboard:
Keywords: a11y, a11y_text-alt
Depends on:
Blocks: 21566
  Show dependency treegraph
 
Reported: 2013-04-03 11:34 UTC by Leif Halvard Silli
Modified: 2013-05-09 17:59 UTC (History)
6 users (show)

See Also:


Attachments

Description Leif Halvard Silli 2013-04-03 11:34:09 UTC
A longdesc is obviously supposed to be used on images that are *not* presentational. As specced by HTML5, it is the empty @alt="" that affects an image to be considered presentational. HTML5 does not include @longdesc in its calculation of whether the image is content or presentation.

QUESTION: So what if an image has empty @alt PLUS @longdesc?
          <img src=src alt="" longdesc="longdesc" />

The answer has two sides: One side is the validity issue. The other issue is make the image 'non-presentational'.

The simplest thing (in the sense that it doesn't challenge the HTML5 spec, too much) would be to say that longdesc in that case does not make the image *non*-presentational *and* to make it an error to include longdesc if the image is presentational.

On the other side: If an <img> has @usemap, then, in praxis, the presentational nature of that image is actually ignored. (HTML5 may be wrong/incomplete.) And it could make sense to say that @usemap - and (for our spec) @longdesc - in this case overrulse the empty @alt. 

It seems to me that regardless, it should be an validaton error to use longdesc on images which uses empty alt. If you agree, then the one thing remaining, is to clarify whether @longdesc should cause the image to be treated as non-presentational, by UAs and ATs.

Presedence for ignoring longdesc when image is presentational: The @summary attribute is frequently ignored by AT when the table is deemed to be presentational.
Comment 1 Charles McCathieNevile 2013-04-03 12:51:56 UTC
I don't think the presence or absence of a longdesc should be used as a determinant of whether an image is presentational.

Use case for longdesc on presentational images:
Stock photography is often included in marketing content (such as home pages, press releases, etc). It is typically decorative, and should have alt="" in many cases. But adding an accurate longdesc allows the photo provider to make their content more discoverable - the legitimate sense of advertising. It also makes it possible to get a better sense of the design aesthetic without having seen the image, which is useful to a range of different people.

I therefore think that having a longdesc on an image with alt="" should not be a validation error.
Comment 2 Leif Halvard Silli 2013-04-03 15:42:43 UTC
(In reply to comment #1)


> I therefore think that having a longdesc on an image with alt="" should not
> be a validation error.

OK. If so, then I suggest that this is expressed in the spec. I don't even know if the use case have been mentioned, yet.
Comment 3 Leif Halvard Silli 2013-04-03 15:44:45 UTC
(In reply to comment #2)
> (In reply to comment #1)
> 
> 
> > I therefore think that having a longdesc on an image with alt="" should not
> > be a validation error.
> 
> OK. If so, then I suggest that this is expressed in the spec. I don't even
> know if the use case have been mentioned, yet.

Also, I wonder about AT - will they, and how will they, be informed about longdesc on presentational images?
Comment 4 Leif Halvard Silli 2013-04-03 15:46:18 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > 
> > 
> > > I therefore think that having a longdesc on an image with alt="" should not
> > > be a validation error.
> > 
> > OK. If so, then I suggest that this is expressed in the spec. I don't even
> > know if the use case have been mentioned, yet.
> 
> Also, I wonder about AT - will they, and how will they, be informed about
> longdesc on presentational images?

And is there not a risk that e.g. a query for all images with longdesc could lead to other results than a query for all non-presentational images? I.e. is there not a risk for confusion?

Also, I once again think it should be said, in the spec, that longdesc does not affect on the role (presentation or otherwise) of the image.
Comment 5 Leif Halvard Silli 2013-04-03 17:43:05 UTC
I have no idea about what to say about the search engine use case. But else, I would like to suggest something like this for the spec:

 ]] 
   With or without @longdesc, this spec, in accordance with HTML5
   and ARIA, expects UAs & ATs to look at @alt or @role in order
   to decide whether to present img elements to the user at all.
 [[

PS: May be it would also be be worth verifying that longdesc on presentational images does not confuse users of legacy AT that support longdesc?

For example: I *think* e.g. Jaws will just ignore such images unless the user somehow decides to inspect presentational images. However, it is very long time since I checked it out.

It would seem unfortunate, to me, if legacy versions of Jaws actually announces the longdesc link even if the image has an empty alt.
Comment 6 Leif Halvard Silli 2013-04-03 18:47:13 UTC
(In reply to comment #5)

>  ]] 
>    With or without @longdesc, this spec, in accordance with HTML5
>    and ARIA, expects UAs & ATs to look at @alt or @role in order
>    to decide whether to present img elements to the user at all.
>  [[

Update:

]] 
  This spec expects UAs & ATs that offer users a graphics free
  user interface, to, in accordance with HTML5 and ARIA, use the
  @alt and @role attributes in order to decide whether to present
  img elements in that interace at all. That is: Presentational
  img elements are experted to be treated as presentational 
  whether or not the element contains a longdesc attribute.
[[
Comment 7 steve faulkner 2013-04-04 11:15:43 UTC
(In reply to comment #1)
> I don't think the presence or absence of a longdesc should be used as a
> determinant of whether an image is presentational.
> 
> Use case for longdesc on presentational images:
> Stock photography is often included in marketing content (such as home
> pages, press releases, etc). It is typically decorative, and should have
> alt="" in many cases. But adding an accurate longdesc allows the photo
> provider to make their content more discoverable - the legitimate sense of
> advertising. It also makes it possible to get a better sense of the design
> aesthetic without having seen the image, which is useful to a range of
> different people.
> 
> I therefore think that having a longdesc on an image with alt="" should not
> be a validation error.

if you think that the current mapping of alt="" to role=presentation is incorrect then suggest filing a bug against html spec. The current definition results in the img being removed from the accessibility tree regardless of the presence of longdesc. In the case of <img alt="" longdesc="description.html"> what would be needed is for the role=presentation not to be applied to the <img>
Comment 8 Charles McCathieNevile 2013-04-04 12:02:06 UTC
Hmm. As Leonie points out in http://tink.co.uk/2011/06/text-descriptions-emotion-rich-images/ the problem is really that we have a very simplistic idea of what "presentational" is.

My rough thinking is that "presentation" is stuff that isn't really necessary for a functional use of content. However, there are times when people want to pay attention to the presentation. Indeed, screen readers can already present presentational things like font information because it can be of interest (or even important to understand), but they don't do it by deafult because it is overkill for the most common use scenario.

I suspect the best answer isn't to change the way the role is determined, but for implementations to be a bit more flexible with "presentation". As I already noted (and Leonie noted in her blog post) things like stock photography and background photographs are often of interest even if they are not really the point of a page (after all, that is why the designer put them there in the first place).

On a technical level, current implementations would not be able to conform to both a requirement that longdesc is valid on
Comment 9 steve faulkner 2013-04-04 12:52:58 UTC
(In reply to comment #8)
> Hmm. As Leonie points out in
> http://tink.co.uk/2011/06/text-descriptions-emotion-rich-images/ the problem
> is really that we have a very simplistic idea of what "presentational" is.
> 
> My rough thinking is that "presentation" is stuff that isn't really
> necessary for a functional use of content. However, there are times when
> people want to pay attention to the presentation. Indeed, screen readers can
> already present presentational things like font information because it can
> be of interest (or even important to understand), but they don't do it by
> deafult because it is overkill for the most common use scenario.
> 
> I suspect the best answer isn't to change the way the role is determined,
> but for implementations to be a bit more flexible with "presentation". As I
> already noted (and Leonie noted in her blog post) things like stock
> photography and background photographs are often of interest even if they
> are not really the point of a page (after all, that is why the designer put
> them there in the first place).
> 
> On a technical level, current implementations would not be able to conform
> to both a requirement that longdesc is valid on

OK but how does that equate to implementation?

the current implemnentation of role=presentation is supported across browsers and does was i said - removes the element from the acc tree, so AT that use the acc tree don't get it or its attributes.
Comment 10 Leif Halvard Silli 2013-04-04 13:31:58 UTC
(In reply to comment #9)

> OK but how does that equate to implementation?
> 
> the current implemnentation of role=presentation is supported across
> browsers and does was i said - removes the element from the acc tree, so AT
> that use the acc tree don't get it or its attributes.

NOTE 1: So, in reality, role="presentation" on void elements such as <img>, has an effect similar to aria-hidden="true". (Sidenote: But in Firefox, at least on Mac, it seems aria-hidden="true" + alt="not-empty", makes assitive technology not remove the <img>.)

NOTE 2: Actually, <img> elements with @usemap, then in Safari+VoiceOver, there is a difference between doing role="presentation" and doing alt="". Namely, if you do  role="presentation", then the entire image map is removed from the accessibility tree. But if you do alt="" and do not add role="presentation", then the image map will function normally.

So there is presedence, it seems, for ignoring the implied presentation role of an empty alt attribute whenever the <img> has the usemap attribute set.

NOTE 3: I recommend someone with access to Jaws, NVDA etc to check whether an image with alt="<empty>" + longdesc="foo" causes the screenreader to ignore the image.
Comment 11 Leif Halvard Silli 2013-04-04 13:56:36 UTC
(In reply to comment #10)

I have not filed bug 21579, to make HTML5 say that <img> elements which have @usemap set, should not be considered presentational even if they have an empty alt="".

It could make sense to say the same thing about presence of @longdesc.
Comment 12 Devarshi Pant 2013-04-04 17:03:39 UTC
> NOTE 3: I recommend someone with access to Jaws, NVDA etc to check whether
> an image with alt="<empty>" + longdesc="foo" causes the screenreader to
> ignore the image.

*JAWS 13 ignores an image with alt="" and longdesc="some value". However, it conveys the presence of long description on an image with alt="value" and longdesc="some value".
*NVDA ver 2012.2.1 ignores an image with alt="" and longdesc="some value". However, it fails to convey information regarding the long description for an image with alt="value" and longdesc="some value".
Both results were run on IE8; Win 7 and may differ based on the selected browser / AT.
-Devarshi
Comment 13 Leif Halvard Silli 2013-04-05 15:13:55 UTC
(In reply to comment #12)
> > NOTE 3: I recommend someone with access to Jaws, NVDA etc to check whether
> > an image with alt="<empty>" + longdesc="foo" causes the screenreader to
> > ignore the image.
> 
> *JAWS 13 ignores an image with alt="" and longdesc="some value". However, it
> conveys the presence of long description on an image with alt="value" and
> longdesc="some value".

Thanks for conforming!

> *NVDA ver 2012.2.1 ignores an image with alt="" and longdesc="some value".
> However, it fails to convey information regarding the long description for
> an image with alt="value" and longdesc="some value".
> Both results were run on IE8; Win 7 and may differ based on the selected
> browser / AT.
> -Devarshi

For NVDA, then I believe you would get better results if you used the latest version of Firefox.

Some comment:

* Compatibility with current longdesc supporting AT suggest that it is best if AT continue to ignore @longdesc when calculating whether the image is presentational.

* With a look at the 'Longdesc lottery', then we can conclude that images with an empty alt *and* a longdesc attribute, is not going to disturb AT users. Which seems like an argumentative win.
Comment 14 Leif Halvard Silli 2013-04-05 15:23:13 UTC
(In reply to comment #13)

> Thanks for conforming!

Err ... confirming.
Comment 15 Charles McCathieNevile 2013-05-01 10:21:29 UTC
Planning to resolve this as invalid, since it isn't really an issue on this spec and I have started a discussion about the ARIA question.

David McDonald has also noted that there is a WCAG technique which is based on the ARIA approach.
Comment 16 Charles McCathieNevile 2013-05-09 17:59:04 UTC
This is a question for HTML and ARIA, not the longdesc attribute.