Warning:
This wiki has been archived and is now read-only.

ChangeProposals/titleFO

From HTML WG Wiki
Jump to: navigation, search


Should it be permitted to omit alt when the title attribute is specified?

At least one Change Proposal argued that when an image has a title attribute specified, it should be permitted to omit the alt attribute.

Change proposals and poll responses argued that there are valid use cases for the title exemption. One use case proposed is that of content authors who cannot provide a true textual equivalent, but can provide a caption; one specific example was blind photographers:

  If an author is unable to include alternative text (e.g. they are
  a blind photographer), then they should still be required to
  include _some_ information, which could include the image's
  caption. The caption belongs in the title="" attribute or in
  <figcaption>.

Comment: the title attribute and figcaption have different semantics, the title attribute cannot be mapped to a caption role in accessibility APIs, <figcaption> can be. The title attribute is used as the accessible name for any element that does not have an accessible name provided using other mechanisms. In the case of <img> the default method of providing an accessible name is using the alt attribute content. If no alt is present and no other namimg mechanism is used (arai-label, aria-labelledby)the accessible name will be the content of the title attribute. This causes a disadvantage to assistive technology users as they are not aware and cannot practically be made aware via an accessibility API that the text alternative announced to them for an image is actually a caption. Use of <figcaption> will not suffer from this issue as <figcaption> can be mapped unambiguously to a caption role, which provides a clear differentiation that can be convyed to AT users.


The IAccessible2 and AT-SPI accessibility API's have caption roles:

"ROLE_CAPTION  The object contains descriptive information, usually
textual, about another user interface element such as a table, chart,
or image."


And similarly:

  2. EQUALITY: There are certain edge cases where a page producer
  must reference an image without knowing what the image is. Such a
  producer cannot, by definition, provide a textual alternative to
  the image: they do not know what the image is.
  One example of this would be a blind photographer who has taken a
  hundred photos during a vacation, without keeping track of any
  information as to when or where each photo was taken. Faced with
  these one hundred JPEG images and the desire to write an HTML Web
  page that exposes those images, the photographer has no ability to
  provide alternative text.

Comment: The use of the title attribute in effect provides a text alternative due to the limitations of title explained above. It is also the case that in the vast majority of cases users of photo services such as flickr have no concept of the differences between a caption and a text alternative. They are also not given the opportunity to provide one or the other or both. Flickr for example allows users to add a title which populates the alt attribute of the image and is repeated below the image and a description which is placed under the the image title. If flickr changed from placing the author supplied title in the alt to title in the title attribute it would not change the way the information is presented to AT users.

This seems like a strong objection to dropping both the title and figcaption exemptions; though it does not clearly establish that both need to be allowed.

An opposed objection argues that this use case is redundant, because it is satisfied by blind photographers or others in this situation creating nonconforming content:

  The blind photographer use case in Proposal 1 is a red herring. A
  blind photographer is not prohibited from publishing photos
  without text alternatives. They are perfectly free to do so. But
  no matter if a photographer is sighted or not, if that
  photographer does not provide a text alternative for an <img>
  element, it doesn't change two facts:
  * The <img> element is still incomplete.
  * A blind USER cannot perceive a photo without a text alternative,
    even if a blind photographer takes it.

It is true that there are constructs in HTML5 that "work" (in the sense that they have a particular effect), even though they are not "conforming". However, in general, the rules for content conformance have been treated in decisions as being driven largely by the set of valid use cases for authors. The argument that authors could simply create nonconforming content appears to concede the validity of the use case and was thus taken as a weak objection.

A further claimed use case was distinguishing advisory information from textual equivalents:

  Advisory information (what title="" contains) is generally
  different from textual equivalents (what alt="" contains). That
  said, user agents could expose such content to the A11Y layer in
  such cases, and this is clearly better than not exposing such
  content. As such, we support permitting such markup.

Since this lacked specific examples of when such a distinction is needed, it was taken to be a relatively weak objection. However, this objection was not seriously disputed. A comment apparently in opposition to allowing title said:

 Authors are advised to only use the title attribute for "additional
 information" and not as a full equivalent alternative.

Yet this only seems to reinforce the premise that there is a distinction between the two, and thus was taken as an even weaker objection.

There were no further objections to validity of these use cases.

One might wonder: since the use cases for omitting alt when title is specified are described as being served by either title or figcaption, is it necessary to allow omitting alt in both cases, or only for one of these constructs? However, both advocates and opponents of these mechanisms pointed out important and relevant differences in behavior. In any case, no objection was made on the grounds of redundancy between these features. Nor was any specific reason given to pick one or the other. Thus, the use cases for title were not found to be redundant.

On the whole then, strong objections establish that omitting alt when title is specified has valid, non-redundant use cases. Therefore, the bar for objections based on negative consequences is high.

Examining the claims of negative consequences, some argued that allowing alt to be omitted when title is title specified is problematic, because the title attribute is fundamentally not accessible:

  The title attribute is not an acceptable text alternative as it's
  content is not displayed to the user unless they can use a mouse
  and beforehand know the content is there. The content of the image
  title attribute is also often not detected by AT by default unless
  the user makes an explicit choice in their preferences to announce
  the attribute contents.

Similarly:

  To reflect the unsuitability of title attribute content to act as
  a caption when a text alternative is not available, as the content
  is not displayed to the user unless they can use a mouse and they
  know the content is there. Refer to Issue 80 for more detail.

And furthermore:

  The title attribute has been around for over 10 years and it has
  never been implemented in a way that would make it a suitable
  substitute for alt attribute content, and there is no sign from
  implementors that this situation will change.

Also:

  The specification forbids user agents from displaying title
  attribute content in the same way it displays alt attribute
  content: "The alt attribute does not represent advisory
  information. User agents must not present the contents of the alt
  attribute in the same way as content of the title attribute."
  This constraint makes it even less likely that at some point in
  the future a critical mass of browsers will implement title
  attribute such that its content will be displayed in a manner that
  provides equivalent access to the content for all users.

Though somewhat tricky to follow, the following passage implies that in at least some assistive technologies, the contents of the title attribute *are* exposed, in an accessible way:

  What we *should* avoid is the the situation we have in the W3
  HTML4 validation service today: there it is permitted to combine
  empty @alt with a non-empty @title: <img src=img alt=""
  title="Lorem ipsum."  > VoiceOver, in accordance with my Validity
  map, treats this example as non-presentational. And, again in
  accordance with my Validity map, the @alt should therefore at
  contain an @alt, since the @alt should reflect the role of the
  <img>. Note that VoiceOver makes no big difference between
  @alt="<empty>" and no alt at all. Thus, as far as VoiceOVer is
  concerned, the need for a non-empty @alt should not only be seen
  as an accessibility but just as much as a simple rule for authors
  to follow!

This was combined with a second-hand report, lacking specifics, that other assistive technology products would not do so:

  However, reportedly, in other AT than VoiceOver, the lack of @alt
  in an <img> which has a non-empty @title, creates more or less the
  same problems whether or not @title is lacking, even if some very
  (conscious) AT user may get help from @title if they enable
  support for it. This is an *accessibility* reason to require an
  @alt even if the <img> has a @title.

Since at least one product is known from testing to expose title="" in an accessible way, and since no evidence was provided that other products cannot or will not do so, the objection that title is an inaccessible mechanism was taken to be a weak objection. The claim that it can't or won't be exposed in an accessible way is outweighed by the concrete example of it being exposed in an accessible way.

A more subtle objection was the claim that, since many products do not yet expose title in an accessible way, that it is problematic to use it now:

  Encouraging use of the title attribute before it is implemented in
  an accessible way does a disservice to users with disabilities.

Not much evidence was provided that this cannot or will not change, however. At least one product is already known to expose title in an accessible way, and others were reported to do so as an option. Thus, this was also taken as a weak objection.

Another argument claims that authors may simply specify title and then neglect to specify alt, even if a proper text alternative *is* known:

  Suggesting that the title is an adequate substitute may encourage
  authors to not provide a text alternative using the alt attribute
  as conformance checkers will not flag the absence of the alt
  attribute as an issue.

No specific evidence was presented that this would occur, so this was taken to be a weak objection.

Another objection argued:

  Also, an empty @alt should together with a non-empty @atitle should
  count as *invalid* since the sighted would perceive such an image
  as non-presentational.

However, this objection failed to explain why the situation described would be a problem, so it was taken to be weak.

Thus, overall, the objections based on problems created by omitting alt when title is specified were found to be weak. But omitting alt when title is specified was found to serve valid, non-redundant use cases.

Thus, overall, the proposal to allow alt to be omitted when title is specified was found to draw weaker objections than the proposal to still require alt when title is specified.