إخفاء مرئي حتى الحصول على التركيز
أخفوا الرابط عن مستخدمي الفأرة وأظهروه عند الضغط على Tab
إخفاء مرئي حتى الحصول على التركيز درس مجاني في Web Accessibility Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Web Accessibility Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Web Accessibility Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
The Design Tension
Skip links are vital, yet many teams worry they clutter the layout. The classic answer: hide it visually, but keep it ready for keyboard users.
Never display none
Do not reach for display none or visibility hidden. Those remove the link from the accessibility tree, so no one can focus it.
Visually Hidden, Still There
The goal is a visually hidden state: invisible on screen, but fully present for keyboards and screen readers.
The Clip Pattern
A common trick shrinks the link to one pixel and clips it. It stays in the DOM and focus order, just out of sight.
.skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }Reveal It on Focus
The magic is the focus state. When Tab lands on the link, your CSS restores its size and pulls it back into view.
.skip-link:focus { width: auto; height: auto; clip: auto; top: 0; }Why focus, Not hover
Use focus, never hover. A keyboard user cannot hover, so a hover-only reveal leaves the link permanently invisible to them.
Make It Clearly Visible
When revealed, give it a solid background and padding. It should look like an obvious button, not faint text the user might miss.
Keep the Focus Outline
Do not strip the focus outline on the revealed link. Users need to see exactly where their focus has landed.
Mind the Position Math
Often the hidden link sits offscreen with a negative top, then slides to top zero on focus. The slide makes the reveal feel deliberate.
A Reusable Utility
This visually hidden pattern is so useful that most teams keep it as a shared utility class for any sr-only content.
Test the Reveal
Press Tab from a fresh load. The skip link should pop into view immediately. Tab away and it should vanish again. ✅
Quick Check
Which approach correctly hides a skip link until needed?
Recap
Hide the skip link with clipping, never display none, and reveal it on focus with a clear outline. Invisible until it is needed. 🎯
الأسئلة الشائعة
هل درس «إخفاء مرئي حتى الحصول على التركيز» مجاني؟
نعم — نص درس «إخفاء مرئي حتى الحصول على التركيز» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Web Accessibility Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Web Accessibility Academy 4 دروس في المجموع.
ماذا ستتعلم في «إخفاء مرئي حتى الحصول على التركيز»؟
أخفوا الرابط عن مستخدمي الفأرة وأظهروه عند الضغط على Tab تتمرن على Web Accessibility Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Web Accessibility Academy؟
لا تُشترط خبرة سابقة. Web Accessibility Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «إخفاء مرئي حتى الحصول على التركيز»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Web Accessibility Academy هذا؟
نعم. كل درس في Web Accessibility Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- لماذا نحتاج إلى الانتقال إلى المحتوى الرئيسي
- إنشاء رابط انتقال يعمل فعلاً
- إخفاء مرئي حتى الحصول على التركيز
- روابط انتقال متعددة للصفحات الكبيرة