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

button-name

ما الذي تفعله

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

متى تستخدمها

  • ✓عندما تضيف أزرارًا بأيقونات فقط، مثل أيقونة إغلاق أو بحث.
  • ✓عندما يعلنها قارئ الشاشة بكلمة button فقط.
  • ✓عندما يأخذ الرابط الزائر إلى صفحة جديدة لكنه مصمم كزر.

رابط المهارة

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

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

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

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

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

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

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

“تأكد من أن كل زر أيقونة في ترويسة موقعي لديه اسم يستطيع قارئ الشاشة قراءته.”

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

كيف تعمل

يتحقق الوكيل من أن لكل زر نصًا ظاهرًا أو aria-label أو aria-labelledby، ويستبدل الأزرار التي تنقل المستخدم بروابط مناسبة.

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

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

Provide accessible names for buttons

Buttons without accessible names are announced as 'button' by screen readers, leaving users unable to determine what action will be triggered.

Quick Reference

  • Ensure every <button> has a discernible, descriptive label
  • Use inner text, aria-label, or aria-labelledby for identification
  • Use buttons for actions and state changes, not page navigation
  • Avoid empty buttons or those containing only non-text icons

Check

Scan for buttons that lack descriptive text or accessible labels.

Fix

Add an accessible name to the button using text content, an aria-label, or an aria-labelledby reference. If the element navigates to another URL, replace the button with a link instead of keeping button semantics.

Explain

Explain why accessible names are critical for screen reader users to identify and interact with buttons, and why buttons should trigger actions while links should handle navigation.

Code Review

Review the rendered markup and interactive states that affect Provide accessible names for buttons. 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/button-name

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

ما الخطأ في زر بلا اسم؟

تقول المهارة إن قارئ الشاشة يعلن كلمة button فقط، فلا يعرف المستخدم ما الذي سيحدث.

متى أستخدم رابطًا بدلًا من ذلك؟

تقول المهارة إنه إذا كان العنصر ينقل إلى عنوان URL آخر، فاستخدم رابطًا بدلًا من دلالة الزر.

ما الأسماء التي يمكن أن يستخدمها الزر؟

النص الداخلي أو aria-label أو aria-labelledby.

التفاصيل

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

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

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

0

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

التعليقات

  • …

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

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