Skip to content

Instantly share code, notes, and snippets.

@notabene
Created November 14, 2014 09:24
Show Gist options
  • Save notabene/e6b5d985942e610d8af0 to your computer and use it in GitHub Desktop.
Save notabene/e6b5d985942e610d8af0 to your computer and use it in GitHub Desktop.

Twitter's handling of emojis

I just saw this in a tweet:

<img class="twitter-emoji" src="https://abs.twimg.com/emoji/v1/72x72/1f61a.png" draggable="false" alt="😚" title="Kissing face with closed eyes" aria-label="Emoji: Kissing face with closed eyes">

I couldn't help thinking:

  1. Yay, Twitter gives a lot of consideration to Accessibility and this is good.
  2. Hey, this alt means nothing to the people who may need it
  3. But they added an aria-label
  4. But why oh why not rely on alt?

Remember Karl Groves:

Before adopting ARIA as your dev. approach, be prepared to answer: What compelling reason do you have for diverging from native semantics?

Ironically: Karl's remark was done… in a tweet

@tregagnon
Copy link

I think it is done like this, because if the UA can't retrieve the image, the OS might be able to display a native emoji using the alt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment