Skip to content
Skillpedia
Websites & UI (frontend)75k · #2811

decorative-elements

What it does

This skill checks decorative images and icons on a page and makes sure screen readers skip them. It is for developers who want accessible websites.

When to use it

  • ✓When a screen reader announces meaningless image names on your page.
  • ✓When you add decorative dividers, icons or background pictures.
  • ✓When you review a page for accessibility before launch.

Skill link

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/decorative-elements/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/decorative-elements/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you make sure the decorative icons on my page are hidden from screen readers?”

5 new skills a week. 1 minute to read.

How it works

The agent checks that decorative images have empty alt text and that decorative icons are hidden with a simple attribute. It also avoids flagging harmless decorative items as problems.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Hide decorative elements from assistive technology

Screen readers announce every image and icon—decorative elements clutter the experience with meaningless 'image, decorative border, image, bullet' announcements.

Quick Reference

  • Use alt='' (empty) for decorative images—not alt='image' or missing alt
  • Add aria-hidden='true' to decorative SVGs and icons
  • Use CSS background-image for purely decorative visuals
  • Role='presentation' removes semantic meaning from elements
  • Do not automatically raise performance findings on decorative micro-assets unless the snippet shows real layout instability
  • Example safe pattern: <img src="/divider.svg" alt="" aria-hidden="true"> is usually a decorative no-op, not a finding by itself

Check

Verify decorative images have empty alt attributes (alt=''), decorative icons use aria-hidden='true', and background images used for decoration are not announced by screen readers. Do not report decorative images as accessibility or performance failures unless the code shows a concrete problem rather than a hypothetical optimization.

Fix

Add alt='' to decorative img elements. Add aria-hidden='true' to decorative SVGs and icon fonts. Use CSS background-image for purely decorative visuals instead of img elements.

Explain

Explain how screen readers announce every image and element unless explicitly hidden, and why decorative content clutters the experience for users navigating with assistive technology.

Code Review

Review the rendered markup and interactive states that affect Hide decorative elements from assistive technology. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/accessibility/decorative-elements

FAQ

What is empty alt text?

It is an alt attribute with no words, which tells screen readers to skip the image. It suits purely decorative pictures.

Should every icon be hidden?

Only decorative icons are hidden. The skill is meant for decorative items, and meaningful images need a text description instead.

Will small decorative images be reported as slow?

The skill says not to, unless the code shows a real layout problem.

Details

Original description by the author

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Hide decorative elements from assistive technology. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant. If an image is clearly decorative, default to no finding unless the snippet shows an actual issue such as broken semantics, focusability, or visible layout instability.

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#2811
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills