0Pricing
Web Accessibility Academy · درس

كل إدخال يحتاج إلى label حقيقي

اربط التسميات بالحقول لتعمل اللمسات والقراءة كما ينبغي.

كل إدخال يحتاج إلى label حقيقي درس مجاني في Web Accessibility Academy على CoddyKit. هذا هو الدرس 1 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Web Accessibility Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Web Accessibility Academy 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

Why Labels Matter

A form field with no name is a mystery box. A real label tells every user, sighted or not, exactly what to type. 🏷️

The label Element

The label element is HTML's built-in way to name a field. The browser, screen readers, and tap targets all understand it for free.

Connect With for and id

The cleanest link is for on the label matching the input's id. Now they are officially paired.

<label for="email">Email</label>
<input id="email" type="email">

IDs Must Be Unique

The id you point to has to be unique on the page. Two inputs sharing one id quietly breaks the pairing.

Wrapping Also Works

You can also wrap the input inside the label. No id needed, since nesting makes the connection clear.

<label>Email
  <input type="email">
</label>

Bigger Click Target

A connected label gives users a larger click area. Tapping the text focuses or checks the field, which helps shaky hands and small screens.

Screen Readers Read It

When focus lands on a paired input, a screen reader speaks the label first. Without it, users hear only the field type.

title Is Not Enough

A title attribute may show on hover, but it is unreliable on touch and keyboard. It is no substitute for a real label.

Checkboxes Need Labels Too

Checkboxes and radios feel obvious visually, but a label is what makes them tappable and announced. Never leave them bare.

<input id="terms" type="checkbox">
<label for="terms">I agree</label>

Visible Beats Hidden

Keep labels visible when you can. Sighted users with cognitive load benefit just as much as screen reader users do.

When You Must Hide It

If a search box has no room for text, hide the label with a visually-hidden class, never display none, so it still reaches assistive tech.

Quick Check

How does a label know which input it names?

Recap

Every input needs a real label, linked by for and id or by wrapping. That one habit makes forms tappable, readable, and clear. ✅

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

هل درس «كل إدخال يحتاج إلى label حقيقي» مجاني؟

نعم — نص درس «كل إدخال يحتاج إلى label حقيقي» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Web Accessibility Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Web Accessibility Academy 4 دروس في المجموع.

ماذا ستتعلم في «كل إدخال يحتاج إلى label حقيقي»؟

اربط التسميات بالحقول لتعمل اللمسات والقراءة كما ينبغي. تتمرن على Web Accessibility Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Web Accessibility Academy؟

لا تُشترط خبرة سابقة. Web Accessibility Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 1 من أصل 4.

كم من الوقت يستغرق درس «كل إدخال يحتاج إلى label حقيقي»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Web Accessibility Academy هذا؟

نعم. كل درس في Web Accessibility Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. كل إدخال يحتاج إلى label حقيقي
  2. Placeholder ليس تسمية
  3. تجميع الحقول باستخدام fieldset وlegend
  4. إعلان نص المساعدة والحقول المطلوبة
← العودة إلى Web Accessibility Academy