Wednesday, November 24, 2010

A better(????) way to author alternate text The real function of alternate text

I have read this
http://xstandard.com/en/articles/better-alt/
since it apeared in my twitter few days ago.

Pure bullshit ! Sorry folks. Image should be used for "Content"
and ALT should really represent content, so it SHOULD describe what is on the image.

For "trick" like heart image, button image etc...

we are talking about

alternate graphical representation for text
not alternate text representation of graphical image content.


So it is all wrong from the begining
from the very markup point of view.

Use any reasonable tag to encapsulate text and style it using CSS.
It can be ABBR if you text contains shortened form like heart pictogram,
or use A HREF if you want to link as well, STRONG,
or use SPAN in the worst case.


Antisable:

save the document by pressing <img alt="save button">

Better:

save the document by pressing <span class="img-as-text save-btn">save button</span>.


heart example would look like:

4 comments:

  1. Thank you Troy McClure.

    Perhaps a review of the following will help you better understand what you don't understand:
    http://www.w3.org/TR/WCAG10/#gl-provide-equivalents

    Thoughts you may not like... but you need to remember.

    ReplyDelete
  2. Progressive enhancement vs degradation ? Image instead of text is enhancement. Should be css not content not markup. Your aproach is degradation.:-))) sorry veteran

    ReplyDelete
  3. Screen readers ? Big chance something like " by pressing /image of/ screen button ". Not bad but ....but "i /image of love/ you " would really confuse me. I Still prefer enhanced text over degraded image for this usecase.

    ReplyDelete
  4. All depends on context: If IMG is primary source of information = CONTENT, we need degrade to provide alternative for techno. or otherwise "impaired". If text is a primary source and image is just "better" and fancier form, I would choose CSS. Your article has chosen maybe just wrong samples. Or I'm "reading it" in wrong order ;-)

    ReplyDelete