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

aria-required-parent

ما الذي تفعله

هذه المهارة تفحص أن العناصر ذات أدوار ARIA معيّنة موجودة داخل الدور الأب الذي تحتاجه. وهي موجهة لمطوري القوائم والألسنة والأدوات المخصصة الأخرى.

متى تستخدمها

  • ✓عندما تبني قائمة أو مجموعة ألسنة أو قائمة من عناصر مخصصة.
  • ✓عندما لا يجمع قارئ الشاشة العناصر معًا في مجموعة.
  • ✓عندما تراجع مكوّنات تستخدم أدوار listitem أو tab أو menuitem.

رابط المهارة

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

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

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

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

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

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

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

“تأكد أن عناصر القائمة لدي موجودة داخل عنصر menu، حتى يقرأها قارئ الشاشة كمجموعة.”

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

كيف تعمل

يجد الوكيل العناصر التي يتطلب دورها أبًا، ويغلّفها بحاوية الدور الصحيحة، أو ينقلها إلى المكان الصحيح في الترميز.

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

النص الأصلي من المؤلف، مباشرة من GitHub.

Ensure ARIA roles are contained by required parent roles

If an ARIA child role (like a menu item) is not contained within its required parent role (like a menu), screen readers may fail to announce the item as part of a group, breaking navigation.

Quick Reference

  • Certain roles (like listitem) must be owned by specific parent roles (like list)
  • Ensure children elements are not orphaned from their semantic containers
  • Maintain valid ARIA hierarchies for menu items, tabs, and list items

Check

Verify that elements with roles like listitem, tab, or menuitem are correctly nested within their required parent roles.

Fix

Wrap elements with roles that require a specific parent in the appropriate container role (e.g., wrap role="listitem" in role="list").

Explain

Explain why certain ARIA roles must be nested within specific parent containers to maintain semantic meaning and group navigation.

Code Review

Review the rendered markup and interactive states that affect Ensure ARIA roles are contained by required parent roles. 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-required-parent

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

ماذا يحدث عندما لا يكون لعنصر القائمة أب من نوع menu؟

تنص المهارة على أن قارئ الشاشة قد لا يعلن العنصر كجزء من مجموعة، وهذا يكسر التنقل.

ما الأدوار التي تذكرها أمثلة؟

تذكر listitem داخل list، وtab داخل tablist، وmenuitem داخل menu.

كيف أصلح ذلك؟

غلّف العنصر بحاوية الدور المناسبة، مثل قائمة تحيط بعناصر القائمة.

التفاصيل

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

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Ensure ARIA roles are contained by required parent roles. 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
الترتيب
#2736
الترخيص
MIT
آخر تحديث
31‏/10‏/2026

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

0

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

التعليقات

  • …

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

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