Перейти к содержанию
Skillpedia
Сайты и интерфейсы (фронтенд)75k · #2843

figure-figcaption

Что он делает

Этот скилл проверяет, правильно ли размечены подписи к изображениям на странице. Он нужен разработчикам и редакторам, которые публикуют контент с картинками.

Когда использовать

  • ✓Когда подпись к изображению на вашей странице написана обычным абзацем.
  • ✓Когда вы публикуете статьи с фотографиями, графиками или диаграммами.
  • ✓Когда подписи к изображениям должны правильно читаться вспомогательными инструментами.

Ссылка на скилл

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

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/figure-figcaption/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Структурируй фотографии и подписи в моей статье правильно.”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Агент находит изображения с текстом прямо рядом и оборачивает каждую пару в элемент figure с figcaption. Он также проверяет, что alt-текст не совпадает с подписью дословно.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

Use <figure> and <figcaption> for image captions

Using a <p> tag as a caption is invisible to assistive technology as an image description. The <figure>/<figcaption> pattern creates a machine-readable relationship between an image and its caption, which screen readers surface to users. It also communicates to search engines that the caption describes the image, supporting image SEO.

Quick Reference

  • Wrap image + visible caption pairs in <figure> with <figcaption> as a direct child
  • <figcaption> must be the first or last child of <figure>
  • Do not duplicate alt text in figcaption—alt is the fallback, figcaption is the visible description
  • <figure> is appropriate for images, code blocks, diagrams, and charts—not every image

Check

Scan the codebase for images with adjacent visible text that acts as a caption (e.g., a <p> or <span> immediately below an <img> describing it). Verify: 1) Such image-caption pairs are wrapped in <figure>. 2) The caption text is inside a <figcaption> element. 3) <figcaption> is a direct child of <figure>. 4) The alt text on the <img> is not identical to the <figcaption> text—they serve different purposes. Flag any <img> followed by descriptive text that is not structured as figure/figcaption.

Fix

For each image with an adjacent caption: 1) Wrap the <img> and its caption text in a <figure> element. 2) Move the caption text into a <figcaption> element inside <figure>. 3) Review the <img> alt attribute—if the figcaption already fully describes the image for sighted users, the alt can be shorter or empty (alt="") only if the figcaption alone is sufficient for screen readers too; otherwise keep a concise alt. 4) Position <figcaption> as the first or last child of <figure>. Show the corrected HTML.

Explain

Explain the semantic meaning of <figure> and <figcaption>. The <figure> element represents self-contained content (an image, code sample, diagram) that is referenced from the main content but could be moved without affecting the document flow. <figcaption> provides a caption or legend for the figure. Screen readers announce the figcaption in association with the figure, giving users context. Without this markup, sighted users see a caption but screen reader users hear only the alt text with no indication that a visible caption exists.

Code Review

Review image assets, markup, and delivery configuration related to Use <figure> and <figcaption> for image captions. Flag exact files or components where format choice, sizing, or loading behavior violates the rule, and describe how to confirm the fix in DevTools.


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

Rule page: https://frontendchecklist.io/rules/images/figure-figcaption

Частые вопросы

Что такое figcaption?

Это элемент HTML для подписи, который размещается внутри figure вместе с изображением.

Должен ли alt-текст совпадать с подписью?

Нет. Скилл говорит, что alt-текст — это запасное описание, а подпись — видимый текст, поэтому они должны отличаться.

Нужен ли figure каждому изображению?

Нет. Скилл говорит, что figure подходит для содержимого вроде блоков кода, диаграмм и графиков, а не для каждой картинки.

Подробности

Оригинальное описание автора

Use when reviewing image assets, markup, and CDN or build transforms related to Use <figure> and <figcaption> for image captions. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.

repo: thedaviddias/Front-End-Checklist

Популярность

Звёзды на GitHub
75k
Место в рейтинге
#2843
Лицензия
MIT
Обновлён
31.10.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы