button-name
ما الذي تفعله
تتحقق هذه المهارة من أن لكل الأزرار في الصفحة اسمًا وصفيًا. وهي موجهة إلى المطورين الذين يبنون الأزرار بأيقونات أو عناصر تحكم مخصصة.
متى تستخدمها
- ✓عندما تضيف أزرارًا بأيقونات فقط، مثل أيقونة إغلاق أو بحث.
- ✓عندما يعلنها قارئ الشاشة بكلمة button فقط.
- ✓عندما يأخذ الرابط الزائر إلى صفحة جديدة لكنه مصمم كزر.
رابط المهارة
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/button-name/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“تأكد من أن كل زر أيقونة في ترويسة موقعي لديه اسم يستطيع قارئ الشاشة قراءته.”
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.
الشعبية
- نجوم GitHub
- 75k
- الترتيب
- #2764
- الترخيص
- MIT
- آخر تحديث
- 31/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
frontendchecklist
75kيفحص شيفرة الواجهة الأمامية والصفحات الحية مقابل أكثر من 380 قاعدة للوصول وسرعة الأداء وتحسين محركات البحث والأمان، بأداة سطر أوامر.
frontend-checklist-global
75kيدقق مشروع الواجهة الأمامية وفق كل قواعد Front-End Checklist البالغ عددها 386، ويقدم إصلاحًا محددًا لكل مشكلة وجدت.
404-page
75kيتأكد من أن صفحة الصفحات غير الموجودة تقدم روابط مفيدة وتُرجع رمز حالة 404 حقيقيًا، لمساعدة الزوار التائهين على إيجاد طريقهم.
about-page
75kيراجع ما إذا كان لموقعك صفحة «من نحن» واضحة تشرح من يديره، لبناء الثقة لدى الزوار ومحركات البحث.
مهارات مشابهة
angular-developer
280kيساعد وكيلك على كتابة شيفرة Angular وتقديم نصائح لبنية المشروع، ويفيد في بدء المشاريع الجديدة وإنشاء المكونات وتحسين الأداء وإمكانية الوصول.
frontend-a11y
280kيساعد وكيلك على جعل واجهات الويب متاحة للجميع، فيضمن أن المواقع والتطبيقات تعمل جيدًا مع قارئات الشاشة والتنقل بلوحة المفاتيح.
frontend-patterns
280kيطبّق وكيلك أنماط تطوير الواجهات الحديثة، فيحسّن الأداء ويدير الحالة ويتبع أفضل الممارسات في React وNext.js.