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

keyboard-navigation

ما الذي تفعله

تتحقق هذه المهارة من أن كل الأجزاء التفاعلية في الصفحة تعمل بمفتاح Tab، وأن التركيز ينتقل بترتيب منطقي. وهي موجهة للمطورين والمصممين الذين يريدون مواقع سهلة الوصول.

متى تستخدمها

  • ✓عندما لا يمكن الوصول إلى زر أو رابط بمفتاح Tab.
  • ✓عندما يستطيع محتوى مخفي أن يتلقى التركيز من لوحة المفاتيح.
  • ✓عندما يعلق مستخدم لوحة المفاتيح داخل جزء من الصفحة.

رابط المهارة

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

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

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

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

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

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

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

“هل يمكنك التحقق من أن كل عنصر تحكم في موقعي يعمل بلوحة المفاتيح فقط؟”

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

كيف تعمل

يختبر الوكيل ترتيب التنقل بـ Tab، ويتحقق من إزالة العناصر المخفية من التركيز، ويبحث عن الحواصر (traps). ويقترح إصلاحات لترتيب DOM وإعدادات tabindex عند الحاجة.

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

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

Enable keyboard navigation for all elements

15% of users rely on keyboard navigation—broken focus order or keyboard traps make your site completely unusable for them.

Quick Reference

  • All interactive elements must be reachable via Tab key
  • Focus order should follow visual reading order (left-to-right, top-to-bottom)
  • Never use positive tabindex values—they break natural flow
  • Hidden content must be removed from tab sequence with tabindex='-1'
  • Keyboard traps are only acceptable inside active modals with a working Escape path

Check

Test that all interactive elements are keyboard accessible, focus order matches visual/reading order, hidden content is not focusable, and no keyboard traps exist except in modals with proper escape handling.

Fix

Ensure tab order follows DOM order matching visual layout. Use tabindex='-1' to remove hidden elements from focus. Avoid positive tabindex values. Ensure off-screen or display:none content cannot receive focus.

Explain

Explain how logical focus order helps keyboard users navigate efficiently, why hidden elements must be removed from the tab sequence to avoid confusion, and how focus management affects users of screen readers and switch devices.

Code Review

Review the rendered markup and interactive states that affect Enable keyboard navigation for all elements. 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/keyboard-navigation

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

لماذا يهم الوصول بلوحة المفاتيح؟

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

متى يُقبل فخ لوحة المفاتيح؟

تقول المهارة إنه يُقبل فقط داخل نافذة حوارية نشطة لها مسار Escape يعمل.

هل تُستخدم قيم tabindex موجبة؟

تقول المهارة لا، لأن القيم الموجبة تكسر التسلسل الطبيعي.

التفاصيل

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

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Enable keyboard navigation for all elements. 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
الترتيب
#2908
الترخيص
MIT
آخر تحديث
31‏/10‏/2026

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

0

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

التعليقات

  • …

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

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