Skip to main content
Brand and assets
BuildMonitor and contribute
/
Brand and assets
  • Foundations
    • The brand
    • Logo
    • Colors
    • Typography
    • Styles
    • Shadows & radii
    • Spacing & grid
    • Gradients
    • Styling & the sx prop
    • Color tokens
    • More
    • Accessibility
      • Accessible names
      • Headings
      • Images
      • Accessible colors
      • Anchors
      • HTML semantics
      • DOM order
      • Accessible alternatives
      • Debug with the accessibility tree
      • Engineer setup
  • Assets
  • AI references
  • Foundations
  • Accessibility
  • Images

Images

Decorative images​

At Alan we love bringing our web page to life using images (mostly marmot ones). Unfortunately, some disabled people can’t see them. Since they don’t hold any information (except being cute) they are considered as decorative images. On the other hand, this is a non-decorative image:

This image contains a string with a specific meaning that cannot be accessed by assistive technology. Accessible images with HTML If you want to use our famous waving marmot, you need to set it as decorative using an empty alt attribute with the img tag. That way, it will be ignored by assistive technologies.

<img
alt=""
src="https://static.alan.com/fr-web/releases/20a0d2a/marmot_waving_neutral_1-363335c063e4dfb5e4968225e4cce137.png"
/>

If you want to use something else, like a svg image, you can add the aria attribute:

<svg aria-hidden="true">// the rest of the svg code</svg>

To make the meaningful above image accessible, you can provide the alternative this way: with an img tag:

<img alt="This is an image" src="/* image url */" />

With a svg tag:

<svg role="img">
<title>This is an image</title>
// the rest of the svg code
</svg>

Of course there are many other patterns. You can get more details here.

Icon and Emoji with Murray​

The Emoji and the Icon components are set as decorative. You can change that.

➡️ You need to ensure are using it with a text or in a labelled interactive element. The context of the image must be understandable without the image.

Non-decorative images​

See the Image component documentation for more information.

Edit this page
Previous
Headings
Next
Accessible colors
  • Decorative images
    • Icon and Emoji with Murray
  • Non-decorative images