استخدام aria-describedby لإضافة سياق
أضيفوا التلميحات والمساعدة التي تُقرأ بعد الاسم
استخدام aria-describedby لإضافة سياق درس مجاني في Web Accessibility Academy على CoddyKit. هذا هو الدرس 3 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Web Accessibility Academy، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Web Accessibility Academy 4 دروس في المجموع.
بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.
Beyond the Name
Sometimes a control needs more than a name. aria-describedby attaches extra context that a screen reader reads after the name.
It References IDs
Like labelledby, aria-describedby holds the id of another element. The browser pulls that element text in as the description.
<input aria-describedby="hint">
<p id="hint">Use 8+ characters</p>Name First, Then Description
A screen reader speaks the name first, then a short pause, then the description. The order helps users grasp the control quickly.
Perfect for Hints
Field hints like format rules belong in aria-describedby, so the guidance reads automatically when the field receives focus.
<input aria-describedby="fmt">
<p id="fmt">Format: DD/MM/YYYY</p>It Does Not Replace the Name
A description is supplementary. If an element has only aria-describedby and no name, it is still effectively unlabeled.
Combine Multiple IDs
Give aria-describedby several space-separated ids, and the browser joins their text, which is handy for a hint plus an error.
<input aria-describedby="hint err">Errors Are Descriptions Too
Point aria-describedby at a validation message so the error reads aloud with the field, not stranded somewhere else on the page.
<input aria-describedby="err">
<p id="err">Email is required</p>Keep Descriptions Brief
A description should be a short sentence. Long aria-describedby text gets read in full every time, which quickly turns tiresome.
It Stays Visible
Unlike a hidden label, the referenced hint usually stays visible on screen, helping sighted users at the same time as it helps others.
Support Can Vary
Most screen readers honor aria-describedby, but some announce it only in certain modes, so test the hint with a real reader.
describedby vs labelledby
Use aria-labelledby for what a control is called and aria-describedby for extra detail about it. They serve different jobs.
Quick Check
You want a password rule read after the field name. Which attribute fits?
Recap: Adding Context
You learned that aria-describedby references ids to read hints and errors after the name, supplementing it without ever replacing it. 💬
الأسئلة الشائعة
هل درس «استخدام aria-describedby لإضافة سياق» مجاني؟
نعم — نص درس «استخدام aria-describedby لإضافة سياق» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Web Accessibility Academy، انتقل إلى CoddyKit PRO. تتضمن دورة Web Accessibility Academy 4 دروس في المجموع.
ماذا ستتعلم في «استخدام aria-describedby لإضافة سياق»؟
أضيفوا التلميحات والمساعدة التي تُقرأ بعد الاسم تتمرن على Web Accessibility Academy مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.
هل أحتاج إلى خبرة سابقة لأبدأ Web Accessibility Academy؟
لا تُشترط خبرة سابقة. Web Accessibility Academy على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 3 من أصل 4.
كم من الوقت يستغرق درس «استخدام aria-describedby لإضافة سياق»؟
معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.
هل يمكنني كتابة وتشغيل أكواد في درس Web Accessibility Academy هذا؟
نعم. كل درس في Web Accessibility Academy يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.
جميع الدروس في هذه الدورة
- حساب الاسم المتاح، بلا غموض
- aria-label مقارنةً بـ aria-labelledby
- استخدام aria-describedby لإضافة سياق
- أخطاء التسمية الشائعة التي تُسكت عناصر التحكم