[wp-trac] Re: [WordPress Trac] #8256: Caption and alternative text
should not be the same
WordPress Trac
wp-trac at lists.automattic.com
Tue Nov 18 13:45:17 GMT 2008
#8256: Caption and alternative text should not be the same
-----------------------------+----------------------------------------------
Reporter: frankie-roberto | Owner:
Type: defect | Status: new
Priority: normal | Milestone: 2.8
Component: Gallery | Version:
Severity: normal | Resolution:
Keywords: |
-----------------------------+----------------------------------------------
Comment (by frankie-roberto):
Interesting, I didn't even realise that there was an edit image popup that
was different from the add image/image gallery popup.
My suggestion would be to add an extra field to the add image popup
labelled something like 'alternative text (used when image not present)'
which is then saved to the database. Alternatively, it'd be better to
leave it empty, and then let people edit it in the HTML/image edit popup.
The reason that using the caption as the initial value for the alt text is
that captions are displayed beneath the image, wheres the alt text is
meant to be a replacement for the image (when images are turned off or
unavailable). Having the caption be the same as the alt text means that
screenreaders would read out the same text twice!
The relevant bits from the HTML5 draft (which really just describes more
explicitly how alt text is meant to work in HTML4) are:
[http://www.w3.org/html/wg/html5/#a-graphical-representation-of-some-of-
the-surrounding-text 4.8.2.1.5]:
"In many cases, the image is actually just supplementary, and its presence
merely reinforces the surrounding text. In these cases, the alt attribute
must be present but its value must be the empty string. In general, an
image falls into this category if removing the image doesn't make the page
any less useful, but including the image makes it a lot easier for users
of visual browsers to understand the concept."
"In these cases, it would be wrong to include alternative text that
consists of just a caption. If a caption is to be included, then either
the title attribute can be used, or the figure and legend elements can be
used. In the latter case, the image would in fact be a phrase or paragraph
with an alternative graphical representation, and would thus require
alternative text."
[http://www.w3.org/html/wg/html5/#a-purely-decorative-image-that-doesn-t
-add-any-information-but-is-still-specific-to-the-surrounding-content
4.8.2.1.6]:
"In general, if an image is decorative but isn't especially page-specific,
for example an image that forms part of a site-wide design scheme, the
image should be specified in the site's CSS, not in the markup of the
document.
However, a decorative image that isn't discussed by the surrounding text
still has some relevance can be included in a page using the img element.
Such images are decorative, but still form part of the content. In these
cases, the alt attribute must be present but its value must be the empty
string.
Examples where the image is purely decorative despite being relevant would
include things like a photo of the Black Rock City landscape in a blog
post about an event at Burning Man, or an image of a painting inspired by
a poem, on a page reciting that poem."
[http://www.w3.org/html/wg/html5/#a-key-part-of-the-content 4.8.2.1.9] is
also relevant.
--
Ticket URL: <http://trac.wordpress.org/ticket/8256#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list