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

aria-toggle-field-name

ما الذي تفعله

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

متى تستخدمها

  • ✓عندما تبني مربع اختيار أو زر راديو أو مفتاحًا.
  • ✓عندما لا يملك المفتاح تسمية ظاهرة أو يحمل أيقونة فقط.
  • ✓عندما تحتوي صفحة الإعدادات على مفاتيح لا يصفها قارئ الشاشة.

رابط المهارة

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

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

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

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

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

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

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

“تحقق من أن كل مفتاح في صفحة الإعدادات لديه اسم يستطيع قارئ الشاشة أن ينطقه.”

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

كيف تعمل

يتأكد الوكيل من أن لكل مفتاح عنصر label أو aria-label أو aria-labelledby، ويضيف اسمًا واضحًا حيثما كان ناقصًا.

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

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

Provide accessible names for toggle fields

Toggle fields like checkboxes and switches are unusable for screen reader users if they don't have a label, as the user won't know what they are turning on or off.

Quick Reference

  • Use aria-label, aria-labelledby, or <label> for checkboxes and radios
  • Ensure the label clearly describes the state or action of the toggle
  • Avoid empty or non-descriptive labels for switches

Check

Check all toggle fields (checkboxes, radio buttons, switches) for a valid accessible name.

Fix

Add an accessible name to the toggle field using a label element, aria-label, or aria-labelledby.

Explain

Explain why all interactive toggle controls must have descriptive names for users to understand their purpose.

Code Review

Review the rendered markup and interactive states that affect Provide accessible names for toggle fields. 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-toggle-field-name

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

لماذا يحتاج المفتاح إلى اسم؟

تقول المهارة إن المستخدمين لن يعرفوا ما الذي يشغّلونه أو يوقفونه بدون اسم.

ما الخيارات التي تسمّي المفتاح؟

عنصر label أو aria-label أو aria-labelledby.

هل تحتاج المفاتيح إلى عناية خاصة؟

نعم. تحذّر المهارة من التسميات الفارغة أو الغامضة على المفاتيح.

التفاصيل

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

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Provide accessible names for toggle fields. 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
الترتيب
#2739
الترخيص
MIT
آخر تحديث
31‏/10‏/2026

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

0

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

التعليقات

  • …

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

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