Skillpedia
المواقع والواجهات (frontend)75k · #2737

aria-roles

ما الذي تفعله

هذه المهارة تفحص أن قيم أدوار ARIA صحيحة ومكتوبة بشكل سليم. وهي موجهة لمطوري من يضيفون أدوارًا إلى مكوّنات مخصصة أو قوالب.

متى تستخدمها

  • ✓عندما تضيف سمة role إلى عنصر مخصص.
  • ✓عندما يبدو أن الدور لا يحدث أي أثر في الصفحة.
  • ✓عندما تراجع ترميزًا يستخدم أسماء أدوار مخصصة أو غير مألوفة.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/aria-roles/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“ابحث في القوالب لدي عن سمات role مكتوبة بخطأ أو غير معيارية، وأصلحها.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يبحث الوكيل عن قيم الأدوار غير الموجودة في القائمة المعيارية ويصححها، ويقترح عنصر تحكم HTML أصليًا حيث يكون ذلك أبسط.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من 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

الأسئلة الشائعة

ماذا يحدث للدور المكتوب بخطأ؟

تنص المهارة على أنه يُتجاهل، فلا تعمل ميزة إمكانية الوصول المقصودة.

هل أستخدم ARIA للأدوات المخصصة؟

تقترح المهارة عناصر التحكم الأصلية في HTML أولًا، مثل button أو select، حين تستطيع أداء المهمة.

هل يمكن أن تعطي مثالًا على خطأ؟

تعطي المهارة check-box بدل checkbox كمثال لدور غير صالح.

التفاصيل

الوصف الأصلي من المؤلف

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

الشعبية

نجوم GitHub
75k
الترتيب
#2737
الترخيص
MIT
آخر تحديث
31‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة