alt-text
Fungsinya
Skill ini memeriksa apakah setiap gambar di halaman memiliki teks alt yang menjelaskan tujuannya. Cocok untuk tim web yang ingin gambar dipahami oleh pengguna pembaca layar dan mesin pencari.
Kapan dipakai
- âSaat Anda menambahkan gambar ke halaman atau templat web.
- âSaat sebuah gambar memakai nama file sebagai teks alt-nya atau tidak memiliki teks alt sama sekali.
- âSaat Anda meninjau halaman untuk aksesibilitas dasar.
Link skill
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/alt-text/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
âPeriksa setiap gambar di beranda saya dan tulis teks alt yang lebih baik di tempat yang kosong atau samar.â
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent memindai setiap elemen gambar, menandai nilai alt yang hilang atau generik, dan menulis deskripsi berdasarkan makna setiap gambar di halaman.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Provide meaningful alt text for images
Approximately 2.2 billion people worldwide have vision impairment. Screen readers read the alt attribute aloudâwithout meaningful alt text, users who are blind receive no information about image content. Missing alt text also fails WCAG 2.1 Success Criterion 1.1.1, which is a Level A (minimum) requirement. Search engines also rely on alt text to index image content.
Quick Reference
- Every
<img>must have analtattributeâomitting it entirely violates WCAG 2.1 SC 1.1.1 - Decorative images use
alt=""so screen readers ignore them - Alt text should describe the image's purpose, not just its appearance
- Linked images: alt describes the link destination, not the visual
Check
Scan all <img> elements in the codebase. Verify: 1) Every <img> has an alt attribute (missing alt is an error). 2) Decorative images use alt="". 3) Informative images have descriptive text that conveys the image's meaningânot just its file name. 4) Images that are links describe the destination. 5) Images of text reproduce the text in alt. Flag any <img> without alt, with alt matching the filename (e.g., alt="photo1.jpg"), or with generic values like alt="image" or alt="photo".
Fix
For each image missing or with poor alt text: 1) Informative imagesâdescribe what the image conveys, not just what it shows (e.g., alt="Bar chart showing 40% increase in sales Q3 2024" not alt="chart"). 2) Decorative imagesâadd alt="" so screen readers skip them. 3) Linked imagesâdescribe the link destination (e.g., alt="Visit our Twitter profile"). 4) Images of textâcopy the text verbatim into alt. 5) Complex images (charts, infographics)âprovide a short alt plus a longer description via aria-describedby or a visible caption.
Explain
Explain WCAG 2.1 Success Criterion 1.1.1 Non-text Content: every image must have a text alternative. Screen readers announce the alt attribute aloudâwithout it, users who are blind or have low vision cannot understand the page. Bad alt text (like alt="image") is no better than no alt text. Decorative images must use alt="" explicitly so screen readers skip them entirelyâomitting alt causes some screen readers to announce the filename.
Code Review
Review image assets, markup, and delivery configuration related to Provide meaningful alt text for images. 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/alt-text
Pertanyaan umum
Apakah gambar dekoratif perlu teks alt?
Tidak. Skill menyatakan gambar dekoratif sebaiknya memakai nilai alt kosong agar pembaca layar melewatinya.
Mengapa teks alt penting untuk pencarian?
Skill menyatakan mesin pencari juga memakai teks alt untuk memahami konten gambar.
Apa yang salah dengan teks alt seperti photo1.jpg?
Teks itu menyebut nama file, bukan makna gambar, sehingga tidak membantu pengguna pembaca layar.
Detail
Deskripsi asli dari pembuat
Use when reviewing image assets, markup, and CDN or build transforms related to Provide meaningful alt text for images. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
Popularitas
- Bintang GitHub
- 75k
- Peringkat
- #2718
- Lisensi
- MIT
- Diperbarui
- 31/10/2026
Komentar
- âŚ
Skill lain dari repositori ini
frontendchecklist
75kMemeriksa kode frontend dan halaman langsung terhadap lebih dari 380 aturan untuk aksesibilitas, kecepatan, SEO, dan keamanan, dengan alat baris perintah.
frontend-checklist-global
75kMengaudit proyek frontend terhadap seluruh 386 aturan Front-End Checklist, dan memberikan perbaikan spesifik untuk setiap masalah yang ditemukan.
404-page
75kMemeriksa bahwa halaman tidak ditemukan Anda menawarkan tautan yang membantu dan mengembalikan status 404 yang sebenarnya, untuk membantu pengunjung yang tersesat.
about-page
75kMeninjau apakah situs Anda memiliki halaman Tentang yang jelas yang menjelaskan siapa yang mengelolanya, untuk membangun kepercayaan pengunjung dan mesin pencari.
Skill serupa
angular-developer
280kMembantu agent Anda membuat kode Angular dan memberi saran struktur proyek. Berguna saat memulai proyek baru, membuat komponen, atau meningkatkan performa.
frontend-a11y
280kMembantu agent Anda membuat antarmuka web dapat diakses semua orang. Memastikan website dan aplikasi berfungsi baik dengan screen reader dan navigasi keyboard.
frontend-patterns
280kMembuat agent Anda menerapkan pola modern dalam frontend. Mengoptimalkan performa, mengelola state, dan mengikuti praktik terbaik React dan Next.js.