listitem
यह क्या करती है
यह स्किल ऐसे list items खोजती है जो सूची के बाहर रखे गए हैं, जैसे div या span के अंदर, और उन्हें ठीक करती है। यह वेब बिल्डर्स और टेम्पलेट लिखने वालों के लिए है जो सही और सुलभ सूचियाँ चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप एजेंट से किसी पेज या टेम्पलेट में list item मार्कअप जाँचवाना चाहते हैं।
- ✓जब कोई कॉम्पोनेंट सूची का मार्कअप कई हिस्सों में बाँटता है और आपको शक है कि कुछ list items का कोई पैरेंट सूची नहीं है।
- ✓जब आप कस्टम ARIA सूचियों की समीक्षा करते हैं और देखना चाहते हैं कि listitem रोल list रोल के भीतर है।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/listitem/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप जाँच सकते हैं कि मेरी साइट के कुछ list items अपनी सूची के रैपर के बिना तो नहीं हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट हर list item को देखता है और जाँचता है कि उसका पैरेंट ul, ol या menu है या नहीं। अगर नहीं है, तो एजेंट आइटम्स को सही सूची कंटेनर में wrap कर देता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Place list items within list containers
When a <li> element exists outside a list container, screen readers lose the ability to announce critical context: NVDA and JAWS will not say 'list of 5 items' or 'item 2 of 5' because there is no list context. VoiceOver may announce the orphan <li> as plain text without any group context, stripping users of the structural information that helps them understand how many items exist and where they are in the list.
Quick Reference
- Every
<li>element must have a direct parent of<ul>,<ol>, or<menu> - Orphan
<li>elements are invalid HTML per the HTML Living Standard - Screen readers announce list type and item count (e.g., 'list, 3 items') only when
<li>is inside a valid list container - Similarly,
role='listitem'must be owned by arole='list'element per WAI-ARIA requirements
Check
Find all <li> elements in the DOM. For each, check that its direct parent element is <ul>, <ol>, or <menu>. Flag any <li> whose parent is <div>, <section>, <nav>, <span>, or any element other than those three. Also check role='listitem' elements to ensure their closest ancestor with a list-related role is role='list'.
Fix
For each orphan <li>: (1) Wrap it and any sibling <li> elements in the appropriate list container — use <ul> for unordered items or <ol> for sequentially ordered items. (2) If the <li> was being used purely for styling (e.g., a bullet point visual), replace it with a <div> or <p> and apply the visual style via CSS. (3) If inside a navigation element, ensure <nav><ul><li> nesting is maintained.
Explain
The HTML Living Standard specifies that <li> elements are only valid as children of <ul>, <ol>, or <menu>. This is a structural requirement, not a style preference. Screen readers use the list container to announce the list type ('bullet list' vs 'numbered list') and the total item count. Without the container, this context is lost entirely. Additionally, when list-style: none is applied to a <ul>, some browsers strip the list semantics — if this is intentional (e.g., a navigation menu), add role='list' to the <ul> to restore list semantics for screen readers.
Code Review
Review the rendered markup and interactive states that affect Place list items within list containers. 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/listitem
अक्सर पूछे जाने वाले सवाल
list item को सूची पैरेंट क्यों चाहिए?
उसके बिना स्क्रीन रीडर उपयोगकर्ताओं को नहीं बता पाते कि कितने आइटम हैं और सूची में वे कहाँ हैं।
कौन-से पैरेंट एलिमेंट मान्य हैं?
स्किल ul, ol और menu को list items के मान्य पैरेंट बताती है।
कस्टम role attributes के बारे में क्या?
स्किल यह भी जाँचती है कि listitem रोल वाले एलिमेंट list रोल वाले एलिमेंट के भीतर हों।
जानकारी
लेखक का मूल विवरण
Use when applies to HTML documents with `<li>` elements. Also applies to custom ARIA lists where `role='listitem'` must be owned by `role='list'`. Common violations occur in templating systems where list markup is split across components or in CSS resets where developers use `<li>` for layout without proper list parents.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2925
- लाइसेंस
- MIT
- अपडेट की गई
- 31/10/2026
कमेंट
- …
इस repository की और skills
frontendchecklist
75kकमांड-लाइन टूल से फ़्रंटएंड कोड और लाइव पेजों को एक्सेसिबिलिटी, स्पीड, SEO और सिक्योरिटी के 380 से ज़्यादा नियमों से जाँचती है।
frontend-checklist-global
75kफ़्रंटएंड प्रोजेक्ट को Front-End Checklist के सभी 386 नियमों से ऑडिट करती है, और हर मिली समस्या का ठोस समाधान देती है।
404-page
75kजाँचती है कि आपका गुम पेज उपयोगी लिंक देता है और सही 404 स्टेटस लौटाता है, ताकि भटके हुए विज़िटर रास्ता ढूँढ सकें।
about-page
75kजाँचती है कि आपकी साइट पर एक साफ़ About पेज है जो बताता है कि उसे कौन चलाता है, ताकि विज़िटर और सर्च इंजन का भरोसा बढ़े।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।