E-mail List Archives
Thread: Null or empty ALT attribute?
Number of posts in this thread: 15 (In chronological order)
From: Glenda
Date: Fri, Jun 10 2005 2:36PM
Subject: Null or empty ALT attribute?
No previous message | Next message →
Just checking current best practices:
Is the preferred term "null ALT" or "'empty ALT"? And is there a space
between the quotes [ALT="" OR ALT=" "]? I have seen it both ways and
curious if there is a consensus yet.
Thanks,
Glenda
Glenda Watson Hyatt, Principal
Soaring Eagle Communications
Accessible websites. Accessible content. Accessible solutions.
www.webaccessibility.biz
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.7 - Release Date: 6/10/05
From: pixeldiva
Date: Fri, Jun 10 2005 3:36PM
Subject: Re: Null or empty ALT attribute?
← Previous message | Next message →
On 10/06/05, Glenda < = EMAIL ADDRESS REMOVED = > wrote:
> Just checking current best practices:
>
> Is the preferred term "null ALT" or "'empty ALT"? And is there a space
> between the quotes [ALT="" OR ALT=" "]? I have seen it both ways and
> curious if there is a consensus yet.
They're two different things. Null is alt="". Empty is alt=" ". Both
are acceptable for decorative images because screen readers ignore
them, although null is preferable, because it won't cause an empty
"tooltip" to pop up on mouseover.
pix
http://www.pixeldiva.co.uk
From: Glenda
Date: Fri, Jun 10 2005 3:36PM
Subject: RE: Null or empty ALT attribute?
← Previous message | Next message →
Ok. So when would someone use an empty ALT or would they?
Glenda Watson Hyatt, Principal
Soaring Eagle Communications
Accessible websites. Accessible content. Accessible solutions.
www.webaccessibility.biz
From: Jens Meiert
Date: Fri, Jun 10 2005 3:44PM
Subject: Re: Null or empty ALT attribute?
← Previous message | Next message →
> > Just checking current best practices: [...]
lol. Actually, null or empty or whatever "alt" attributes are a sign of bad
practice. Per se. Something's definitely going wrong if you stumble across
them *.
> They're two different things. Null is alt="". Empty is alt=" ". [...]
I cannot wait until there is no such discussion anymore. Ironically, nobody
will notice when to party.
* Wait a minute: In practice, transparent images are often use to count page
hits. This might be a strongheaded story.
--
Jens Meiert
Information Architect
http://meiert.com/
From: Michael Moore
Date: Fri, Jun 10 2005 3:46PM
Subject: Re: Null or empty ALT attribute?
← Previous message | Next message →
Glenda wrote:
> Just checking current best practices:
>
> Is the preferred term "null ALT" or "'empty ALT"?
don't think that it really matters but I usually use empty alt myself
And is there a space
> between the quotes [ALT="" OR ALT=" "]?
You betcha - alt="" is ignored by screen readers, alt=" " is spoken by
screen some screen readers. "graphic blank" or "graphic space" I think.
I have seen it both ways and
> curious if there is a consensus yet.
>
> Thanks,
> Glenda
>
> Glenda Watson Hyatt, Principal
> Soaring Eagle Communications
> Accessible websites. Accessible content. Accessible solutions.
> www.webaccessibility.biz
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.6.7 - Release Date: 6/10/05
>
>
>
>
>
>
>
From: Glenda
Date: Fri, Jun 10 2005 3:50PM
Subject: RE: Null or empty ALT attribute?
← Previous message | Next message →
Jens,
I am intrigued by your comment. Can you explain further why null/empty ALTs
are a bad practice?
Cheers,
Glenda
Glenda Watson Hyatt, Principal
Soaring Eagle Communications
Accessible websites. Accessible content. Accessible solutions.
www.webaccessibility.biz
From: Paul Bohman
Date: Fri, Jun 10 2005 3:52PM
Subject: Re: Null or empty ALT attribute?
← Previous message | Next message →
Glenda wrote:
> Ok. So when would someone use an empty ALT or would they?
I don't know of a context where alt=" " (alt equals quote space quote)
ought to be used. I use alt="" (alt equals quote quote) quite a bit,
because I often explain the images in the context of the text or else
the image is there only for aesthetic purposes, and does not change the
meaning of the content. In these cases, the image could be left off
completely without sacrificing screen reader accessibility.
Of course, the pictures are there because they enhance accessibility for
visual users, but that's somewhat of a different (but very important) topic.
The quote space quote idea doesn't have any advantages for anything that
I'm aware of.
--
Paul Bohman
Director of Training Products and Services
WebAIM (Web Accessibility in Mind)
www.webaim.org
Utah State University
www.usu.edu
From: Glenda
Date: Fri, Jun 10 2005 3:59PM
Subject: RE: Null or empty ALT attribute?
← Previous message | Next message →
Thanks Paul,
Sounds like NULL where ALT = quote quote is the current consensus. That is
all I needed to know. Just fact-checking for another article for the next
AccessibleContent issue.
Cheers,
Glenda
Glenda Watson Hyatt, Principal
Soaring Eagle Communications
Accessible websites. Accessible content. Accessible solutions.
www.webaccessibility.biz
From: pixeldiva
Date: Fri, Jun 10 2005 4:02PM
Subject: Re: Null or empty ALT attribute?
← Previous message | Next message →
On 10/06/05, Glenda < = EMAIL ADDRESS REMOVED = > wrote:
> Thanks Paul,
>
> Sounds like NULL where ALT = quote quote is the current consensus. That is
> all I needed to know. Just fact-checking for another article for the next
> AccessibleContent issue.
Some content management systems won't let you enter null alt text for
an image, forcing you to use empty instead.
pix
http://www.pixeldiva.co.uk
From: Glenda
Date: Fri, Jun 10 2005 4:16PM
Subject: RE: Null or empty ALT attribute?
← Previous message | Next message →
There always has to be an exception with this stuff, doesn't there? <grin>
Thanks Pix.
Glenda Watson Hyatt, Principal
Soaring Eagle Communications
Accessible websites. Accessible content. Accessible solutions.
www.webaccessibility.biz
From: Jared Smith
Date: Fri, Jun 10 2005 4:28PM
Subject: Re: Null or empty ALT attribute?
← Previous message | Next message →
Much of this alt=" " thing arose from early flawed screenreaders that
identified images that had alt="" but ignored images with alt=" ". Also,
many early (and some existing) tools did not allow the addition of true
empty alt text, so people just put a space in there so the alt attribute
showed up and they could be (supposedly) HTML compliant.
And to quote from the HTML specifications (though their example is a
rather poor one):
"Do not specify irrelevant alternate text when including images intended
to format a page, for instance, alt="red ball" would be inappropriate for
an image that adds a red ball for decorating a heading or paragraph. In
such cases, the alternate text should be the empty string (""). Authors
are in any case advised to avoid using images to format pages; style
sheets should be used instead."
In short, alt="" is correct. Null (or empty or whatever) alt text usually
indicates the use of images for decoration, spacing, and other
non-important elements. Such decoration/styling/positioning should be done
with styles instead, so this is why images that use alt="" should be avoided.
An obvious exception to this is when the alternative text for an image is
presented within the content of the page, such as in an image caption. In
this case, rather than repeating the description in the alt attribute, the
alt attribute for the image should be set to "".
Any system that does not allow null alt text (previous versions of
Frontpage and Dreamweaver come to mind) is flawed.
Jared Smith
WebAIM
From: Glenda
Date: Fri, Jun 10 2005 5:02PM
Subject: RE: Null or empty ALT attribute?
← Previous message | Next message →
I love this! This thread is demonstrating the point that I want to make in
my article -- that web accessibility is more than simply applying a set of
rules. It entails knowing best practices in web design AND knowing the
current status of assistive technology.
I don't think most people "out there" understand web accessibility is not
absolute; there are grey areas. The question I asked, which I thought was
fairly straightforward, demonstrates that there is no simple answer. Now,
the challenge is to write this into a well-developed article.
The next question that comes to mind is, if it's more than a set of
rules/guidelines/standards [whatever you want to call them], how do you
teach web accessibility?
Cheers,
Glenda
Glenda Watson Hyatt, Principal
Soaring Eagle Communications
Accessible websites. Accessible content. Accessible solutions.
www.webaccessibility.biz
From: Jens Meiert
Date: Fri, Jun 10 2005 8:59PM
Subject: RE: Null or empty ALT attribute?
← Previous message | Next message →
> > lol. Actually, null or empty or whatever "alt" attributes are a sign
> > of bad practice.
>
> I am intrigued by your comment. Can you explain further why null/empty
> ALTs are a bad practice?
You only need them when dealing with purely decorative images. And these
really, really want to go home, back into that lovely, lovely style sheet
(jah, they really want to).
PS.
Did I even mention the fact that top-posting is bad practice, too? And I
once thought that Joe already evangelized the world (don't believe these
medicine men anymore, Jens, please do not).
--
Jens Meiert
Information Architect
http://meiert.com/
From: John Foliot - WATS.ca
Date: Sun, Jun 12 2005 5:29AM
Subject: RE: Null or empty ALT attribute?
← Previous message | Next message →
pixeldiva wrote:
>
> Some content management systems won't let you enter null alt text for
> an image, forcing you to use empty instead.
>
Then it is broken. Insist that it be fixed or returned for full refund.
JF
--
John Foliot = EMAIL ADDRESS REMOVED =
Web Accessibility Specialist / Co-founder of WATS.ca
Web Accessibility Testing and Services
http://www.wats.ca
Phone: 1-613-482-7053
From: Jukka K. Korpela
Date: Mon, Jun 13 2005 6:53AM
Subject: Re: Null or empty ALT attribute?
← Previous message | No next message
On Fri, 10 Jun 2005, Jared Smith wrote:
> Any system that does not allow null alt text (previous versions of
> Frontpage and Dreamweaver come to mind) is flawed.
Certainly. And so is a system that makes it unnecessarily difficult to use
a null alt text, such as newer versions of FrontPage (where you need to
check a box with text saying "this image does not need alternate text"
or something like that, something rather absurd (since checking it does
not cause the alt attribute to be omitted but the generation of
alt="").
Regarding blank alt text, alt=" ", it is surely adequate when an image is
used as a spacer between words that have no real whitespace between them.
Spacer images are bad practice, but they have been used, and are still
used; _if_ you use them, alt=" " helps against some problems.
--
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/