WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Null ALT in Office

for

From: Jukka K. Korpela
Date: May 29, 2013 12:50AM


2013-05-28 23:20, Karen Sorensen wrote:

> I thought that "" created null alt text in MS Word? Am I just making that
> up? I know the html attribute is alt="", but does that not translate into
> putting "" in the description field of the Alt window in Word 2010?

I was at first a bit puzzled: I did not know you can create alt texts in
Word. And this feature is oddly hidden in the user interface: you need
to right-click an image and then select "Size"!

Using "" there, with the quotation marks literally included, results in
using that two-character string literally. When you Save as HTML, you
get alt="""", which is not what you want. The same probably
happens when saving in other formats.

Using an empty string, i.e. deleting the default string (taken from
image file name) and writing nothing instead, results in no alt
attribute in HTML.

Some other authoring tools have the same (mis)feature: they just cannot
distinguish lack of alternative text from an empty alternative text.

I guess the best workaround is to type in a space character. This
results in alt=" ", which is of course distinct from alt="", but mostly
the difference does not matter. Usually alt="" is (properly) used for
decorative images that have no message that could reasonably be
presented in text, and it tells user agents to ignore the img tag if the
image is not rendered. Telling user agents to use a space is technically
different, but should mostly have the same effect.

Theoretically, it might be argued that if you cannot make the
alternative text empty, you should set it to a zero-width character,
such as U+200B ZERO WIDTH SPACE, but entering it is nontrivial (though
possible) in Word, and who knows how it might affect different user
agents in reality? (U+0000 NULL might seem appropriate at character
level, but it isn't even allowed in HTML.)

Yucca