Langsung ke konten
Skillpedia
Website & UI (frontend)75k Β· #2737

aria-roles

Fungsinya

Skill ini memeriksa apakah nilai peran ARIA valid dan dieja dengan benar. Cocok untuk pengembang yang menambahkan peran ke komponen atau templat kustom.

Kapan dipakai

  • βœ“Saat Anda menambahkan atribut role ke elemen kustom.
  • βœ“Saat sebuah peran tampaknya tidak berpengaruh pada halaman.
  • βœ“Saat Anda meninjau markup yang memakai nama peran kustom atau tidak biasa.

Link skill

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

Salin 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

Gunakan skill ini untuk membantu saya: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/aria-roles/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œCari atribut role di templat saya yang salah eja atau tidak standar, lalu perbaiki.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Agent mencari nilai peran yang tidak ada dalam daftar standar, mengoreksinya, dan menyarankan kontrol HTML asli jika itu lebih sederhana.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Use valid ARIA role values

Invalid or misspelled ARIA roles are ignored by browsers and assistive technologies, rendering the intended accessibility features useless and potentially confusing users.

Quick Reference

  • Use only standard ARIA roles defined in the W3C specification
  • Avoid typos or non-existent roles (e.g., use checkbox, not check-box)
  • Ensure roles are applied to appropriate HTML elements
  • Prefer native HTML controls over custom ARIA widgets whenever possible

Check

Search for any role attributes that use non-standard or misspelled ARIA role values.

Fix

Replace invalid ARIA roles with the correct, standard values from the WAI-ARIA specification. When a native <button>, <input>, <select>, or other semantic element can replace the custom widget, prefer that change over adding more ARIA.

Explain

Explain why using standardized ARIA roles is critical for ensuring that assistive technologies can interpret and announce elements correctly, and why native HTML controls are usually more reliable than recreating them with ARIA.

Code Review

Review the rendered markup and interactive states that affect Use valid ARIA role values. 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/aria-roles

Pertanyaan umum

Apa yang terjadi pada peran yang salah eja?

Skill menyatakan peran itu diabaikan, sehingga fitur aksesibilitas yang dimaksud tidak berfungsi.

Apakah saya harus memakai ARIA untuk kontrol kustom?

Skill menyarankan kontrol HTML asli seperti button atau select terlebih dahulu, jika kontrol tersebut bisa melakukan pekerjaannya.

Bisakah Anda memberi contoh kesalahan?

Skill memberi contoh check-box, bukan checkbox, sebagai peran yang tidak valid.

Detail

Deskripsi asli dari pembuat

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Use valid ARIA role values. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.

repo: thedaviddias/Front-End-Checklist

Popularitas

Bintang GitHub
75k
Peringkat
#2737
Lisensi
MIT
Diperbarui
31/10/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa