Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Great Mess of Alternative Text

HTeuMeuLeu
August 30, 2017

The Great Mess of Alternative Text

From accessibility to blocked image rendering, alternative text is an important part of email coding. But the differences in rendering and styling possibilities between browsers and email clients can be staggering. Welcome to a deep technical dive on the great mess that is alternative text.

This was presented at #LitmusLive 2017 in London on Wednesday, August 30th.

HTeuMeuLeu

August 30, 2017
Tweet

More Decks by HTeuMeuLeu

Other Decks in Technology

Transcript

  1. <img alt="" /> ! // Gmail, Yahoo and Outlook.com //

    remove the src attribute completely.
  2. Change the src attribute. Gmail Outlook.com Yahoo! La Poste (desktop)

    AOL Free Remove the src attribute. Outlook.com (old version) La Poste (mobile)
  3. <img src="//a.gfx.ms/i_safe.gif" alt="" /> ! // The old Outlook.com used

    to // replace the value of the src attribute.
  4. IMAGE IS BLOCKED SRC NO SRC CHROME Safari IE OTHER

    BROWSERS NO ICON XP 7 8-10 ON WINDOWS
  5. IMAGE IS BLOCKED SRC NO SRC IE CHROME Safari IE

    OTHER BROWSERS NO ICON XP XP 7 8-10 ON WINDOWS ON WINDOWS 7 8-10
  6. IMAGE IS BLOCKED SRC NO SRC IE CHROME Safari IE

    OTHER BROWSERS NO ICON XP 7 8-10 XP 7 8-10 ON WINDOWS ON WINDOWS
  7. IMAGE IS BLOCKED SRC NO SRC IE CHROME Safari IE

    OTHER BROWSERS NO ICON XP 7 8-10 XP 7 8-10 ON WINDOWS ON WINDOWS ALT NO ALT
  8. SRC NO SRC IE CHROME Safari IE OTHER BROWSERS NO

    ICON XP 7 8-10 XP 7 8-10 ON WINDOWS ON WINDOWS FIREFOX
  9. SRC NO SRC IE CHROME Safari IE OTHER BROWSERS NO

    ICON XP 7 8-10 XP 7 8-10 ON WINDOWS ON WINDOWS NO ALT FIREFOX
  10. SRC NO SRC IE CHROME Safari IE OTHER BROWSERS NO

    ICON XP 7 8-10 XP 7 8-10 ON WINDOWS ON WINDOWS NO ALT FIREFOX
  11. ALT NO ALT FIREFOX EMPTY NOT EMPTY OTHER BROWSERS SAFARI

    TEXT FITS TEXT DOESN'T FIT NO TEXT TEXT
  12. ALT NO ALT FIREFOX EMPTY NOT EMPTY NO TEXT TEXT

    Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT
  13. ALT NO ALT FIREFOX EMPTY NOT EMPTY NO TEXT TEXT

    Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT BLOCK -ISH INLINE -ISH
  14. ALT NO ALT FIREFOX EMPTY NOT EMPTY NO TEXT TEXT

    Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT BLOCK -ISH INLINE -ISH NOTHING AT ALL
  15. ALT NO ALT FIREFOX EMPTY NOT EMPTY NO TEXT TEXT

    OTHER BROWSERS Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT BLOCK -ISH INLINE -ISH NOTHING AT ALL
  16. ALT NO ALT SAFARI FIREFOX CHROME EMPTY NOT EMPTY NO

    TEXT TEXT OTHER BROWSERS Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT BLOCK -ISH INLINE -ISH NOTHING AT ALL
  17. ALT NO ALT SAFARI FIREFOX CHROME EMPTY NOT EMPTY TITLE

    ATTRIBUTE NO TEXT TEXT OTHER BROWSERS Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT BLOCK -ISH INLINE -ISH NOTHING AT ALL
  18. ALT NO ALT SAFARI FIREFOX CHROME EMPTY NOT EMPTY TITLE

    ATTRIBUTE NO TEXT TEXT OTHER BROWSERS Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT BLOCK -ISH INLINE -ISH NOTHING AT ALL
  19. ALT NO ALT SAFARI FIREFOX CHROME EMPTY NOT EMPTY TITLE

    ATTRIBUTE NO TEXT TEXT OTHER BROWSERS Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT BLOCK -ISH INLINE -ISH NOTHING AT ALL OTHER BROWSERS
  20. ALT NO ALT SAFARI FIREFOX CHROME EMPTY NOT EMPTY TITLE

    ATTRIBUTE NO TEXT TEXT OTHER BROWSERS Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT BLOCK -ISH INLINE -ISH NOTHING AT ALL OTHER BROWSERS
  21. ALT NO ALT SAFARI FIREFOX CHROME EMPTY NOT EMPTY TITLE

    ATTRIBUTE NO TEXT TEXT OTHER BROWSERS Firefox OTHER BROWSERS SAFARI TEXT FITS TEXT DOESN'T FIT BLOCK -ISH INLINE -ISH NOTHING AT ALL OTHER BROWSERS
  22. ALT NO ALT IMAGE IS BLOCKED SRC NO SRC IE

    CHROME Safari IE OTHER BROWSERS NO ICON XP 7 8-10 XP 7 8-10 ON WINDOWS ON WINDOWS
  23. NO ALT IMAGE IS BLOCKED SRC IE CHROME Safari XP

    7 8-10 X ON WINDOWS ONLY WIDTH ONLY HEIGHT
  24. NO ALT IMAGE IS BLOCKED SRC IE CHROME Safari XP

    7 8-10 X ON WINDOWS ONLY WIDTH ONLY HEIGHT Safari
  25. NO ALT IMAGE IS BLOCKED SRC IE CHROME Safari XP

    7 8-10 X ON WINDOWS ONLY WIDTH ONLY HEIGHT Safari
  26. /* Supported by IE, Safari, Chrome and Firefox */ color:

    #f60; background: #eee; ! /* Supported by Safari, Chrome and Firefox */ font-size: 32px; font-family: Georgia, sans-serif; font-style: italic; font-weight: bold; word-spacing: 10px; letter-spacing: 2px;
  27. img { position: relative; display: block; } ! img:before {

    content: attr(alt); background: #cacaca; } Lorem ipsum Lorem ipsum
  28. img { position: relative; display: block; } ! img:before {

    content: attr(alt); background: #cacaca; position: absolute; left: 0; right: 0; top: 0; bottom: 0; } Lorem ipsum