This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In the following example in the draft (4.8.1.1.6), a caption is included in the image's alt attribute. While this could be a legit use of the alt attribute, I feel it's more appropriate to store this information in a figure, with a corresponding figcaption. This way the alt attribute of the image can remain related to the images content and the figcaption would describe the purpose of the figure itself. Thoughts? Original: "<p><img src="figure1.gif" alt="Figure 1. Distribution of Articles by Journal Category. Pie chart: Language=68%, Education=14% and Science=18%."></p>" Suggestion: "<figure><img src="figure1.gif" alt="Pie chart: Language=60%, Education=14% and Science=18%."><figcaptio>Figure 1. Distribution of Articles by Journal Category.</figcaption></figure>"
(In reply to comment #0) > In the following example in the draft (4.8.1.1.6), a caption is included in > the image's alt attribute. > > While this could be a legit use of the alt attribute, I feel it's more > appropriate to store this information in a figure, with a corresponding > figcaption. This way the alt attribute of the image can remain related to > the images content and the figcaption would describe the purpose of the > figure itself. > > Thoughts? > > Original: > "<p><img src="figure1.gif" alt="Figure 1. Distribution of Articles by > Journal Category. > Pie chart: Language=68%, Education=14% and Science=18%."></p>" > > Suggestion: > "<figure><img src="figure1.gif" alt="Pie chart: Language=60%, Education=14% > and Science=18%."><figcaptio>Figure 1. Distribution of Articles by Journal > Category.</figcaption></figure>" Hi Reiner, in this case the 'caption' text is included in the image, so the text alternative in the alt attribute is reflecting that. as it states in the example: "Consider an image containing a pie chart and associated text. It is recommended wherever possible to provide any associated text as text, not an image of text. If this is not possible include the text in the text alternative along with the pertinent information conveyed in the image.
Ah okay I see, it's just in the case where (for some reason) you can't provide the text equivalent. Will close this issue then ;-) Thanks!
I think this suggestion might be a bit too perscriptive, and giving screen reader users two places to find the alt may be more steps than efficient for such a short alt..