frontend-a11y
यह क्या करती है
यह वेबसाइट और ऐप्स को सबके लिए आसान बनाने में मदद करता है, खासकर विकलांग लोगों के लिए। यह सुनिश्चित करता है कि बटन, फॉर्म और दूसरे elements screen readers और keyboard navigation के साथ सही तरीके से काम करें।
कब इस्तेमाल करें
- ✓वेबसाइट फॉर्म बनाते समय।
- ✓इंटरैक्टिव बटन या मेनू जोड़ते समय।
- ✓अपने कोड में accessibility की चेतावनी (warning) मिलने पर।
Skill का लिंक
https://github.com/affaan-m/ECC/blob/main/pi/core/skills/frontend-a11y/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं अपने लॉगिन फॉर्म को दृष्टिबाधित (visually impaired) यूज़र्स के लिए accessible कैसे बनाऊं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट कुछ खास कोड स्निपेट्स (जैसे 'htmlFor', 'aria-label') जोड़ता है, जिससे screen readers पेज के elements को समझ और इस्तेमाल कर पाते हैं। यह हर काम के लिए सही HTML tags इस्तेमाल करने का भी सुझाव देता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Frontend Accessibility Patterns
Practical accessibility patterns for React and Next.js. Covers the issues most commonly flagged in code review: missing form labels, incorrect ARIA usage, non-semantic interactive elements, and broken keyboard navigation.
When to Activate
- Building or reviewing form components (
<input>,<select>,<textarea>) - Creating interactive elements (modals, dropdowns, tooltips, tabs)
- Using
<div>or<span>withonClick - Adding
aria-*attributes to any element - Implementing keyboard navigation or focus management
- Receiving accessibility feedback from code review tools (CodeRabbit, ESLint a11y)
- Building components that must support screen readers
Form Accessibility
Missing htmlFor / id pairing and disconnected error messages are the most common issues flagged in code review.
Label Connection
// BAD: label has no connection to input — screen readers cannot associate them
<label>Email</label>
<input type="email" />
// GOOD: htmlFor matches input id
<label htmlFor="email">Email</label>
<input id="email" type="email" />
Required Fields
// BAD: visual-only asterisk conveys nothing to screen readers
<label htmlFor="email">Email *</label>
<input id="email" type="email" />
// GOOD: required enables native browser validation; aria-required signals it to screen readers
<label htmlFor="email">
Email <span aria-hidden="true">*</span>
</label>
<input id="email" type="email" required aria-required="true" />
Error Messages
// BAD: error text exists visually but is not linked to the input
<input id="email" type="email" />
<span className="error">Invalid email address</span>
// GOOD: aria-describedby connects input to its error message
// aria-invalid signals the invalid state to screen readers
<input
id="email"
type="email"
aria-describedby="email-error"
aria-invalid={!!error}
/>
{error && (
<span id="email-error" role="alert">
{error}
</span>
)}
Complete Accessible Form
interface LoginFormProps {
onSubmit: (email: string, password: string) => void;
}
export function LoginForm({ onSubmit }: LoginFormProps) {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [errors, setErrors] = useState<{ email?: string; password?: string }>({});
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
const newErrors: typeof errors = {};
if (!email) newErrors.email = 'Email is required';
if (!password) newErrors.password = 'Password is required';
if (Object.keys(newErrors).length) {
setErrors(newErrors);
return;
}
onSubmit(email, password);
};
return (
<form onSubmit={handleSubmit} noValidate>
<div>
<label htmlFor="email">
Email <span aria-hidden="true">*</span>
</label>
<input
id="email"
type="email"
value={email}
onChange={e => setEmail(e.target.value)}
aria-required="true"
aria-describedby={errors.email ? 'email-error' : undefined}
aria-invalid={!!errors.email}
autoComplete="email"
/>
{errors.email && (
<span id="email-error" role="alert">
{errors.email}
</span>
)}
</div>
<div>
<label htmlFor="password">
Password <span aria-hidden="true">*</span>
</label>
<input
id="password"
type="password"
value={password}
onChange={e => setPassword(e.target.value)}
aria-required="true"
aria-describedby={errors.password ? 'password-error' : undefined}
aria-invalid={!!errors.password}
autoComplete="current-password"
/>
{errors.password && (
<span id="password-error" role="alert">
{errors.password}
</span>
)}
</div>
<button type="submit">Log in</button>
</form>
);
}
Semantic HTML
Use the element that matches the intent. Screen readers and keyboard users depend on native semantics.
// BAD: div has no role, no keyboard support, no accessible name
<div onClick={handleClick}>Submit</div>
// GOOD: button is focusable, activates on Enter/Space, announces as "button"
<button type="button" onClick={handleClick}>Submit</button>
// BAD: non-semantic navigation
<div onClick={() => navigate('/home')}>Home</div>
…
अक्सर पूछे जाने वाले सवाल
'screen readers' क्या होते हैं?
ये ऐसे प्रोग्राम हैं जो स्क्रीन पर लिखा हुआ कंटेंट ज़ोर से पढ़कर सुनाते हैं, ताकि दृष्टिबाधित लोग कंप्यूटर और फोन इस्तेमाल कर सकें।
'aria-label' या 'htmlFor' क्यों इस्तेमाल करें?
ये कोड label को फॉर्म फील्ड या बटन से जोड़ते हैं, ताकि screen readers सही तरीके से बता सकें कि वह element किस काम के लिए है।
'onClick' वाले 'div' का इस्तेमाल कब करूं?
आम तौर पर नहीं करना चाहिए। इसके बजाय <button> tag इस्तेमाल करना बेहतर है, क्योंकि उसमें keyboard से क्लिक करने जैसी accessibility सुविधाएं पहले से होती हैं।
जानकारी
लेखक का मूल विवरण
Accessibility patterns for React and Next.js — semantic HTML, ARIA attributes, form labeling, keyboard navigation, focus management, and screen reader support. Use when building or reviewing forms, modals, dropdowns, tooltips, or tabs, fixing a11y lint or code-review findings, or wiring up keyboard navigation and focus management.
repo: affaan-m/ECC
लोकप्रियता
- GitHub स्टार
- 280k
- रैंकिंग में स्थान
- #182
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
accessibility
280kयह आपके एजेंट को ऐसे इंटरफ़ेस बनाने में मदद करता है जिन्हें हर कोई इस्तेमाल कर सके। यह पक्का करता है कि वेबसाइट और ऐप दिव्यांग लोगों के लिए भी अच्छे से काम करें, जैसे नेत्रहीन या जिन्हें चलने-फिरने में दिक्कत होती है।
agent-architecture-audit
280kयह आपके एजेंट को जाँचने देता है कि सब कुछ सही से चल रहा है। यह AI सिस्टम में समस्याएँ ढूँढकर ठीक करता है, ताकि वे उम्मीद के मुताबिक काम करें।
agent-eval
280kयह आपके एजेंट को अलग-अलग AI coding tools की तुलना करने में मदद करता है। यह मापता है कि किसी खास काम के लिए कौन सा टूल ज़्यादा तेज़, सस्ता और भरोसेमंद है।
agent-harness-construction
280kयह आपके एजेंट को काम कैसे करना है, यह बेहतर समझने में मदद करता है। यह उन tools और instructions को बेहतर बनाता है जिनका एजेंट इस्तेमाल करता है, ताकि उसकी सफलता की संभावना बढ़े।
मिलती-जुलती skills
dream-loop
260kआपके एजेंट को 3D दृश्य या विज़ुअल ऐप के स्क्रीनशॉट को कॉन्सेप्ट आर्ट से मिलाकर बार-बार सुधारते हुए उच्च ग्राफ़िकल गुणवत्ता की ओर ले जाने देती है।
pretext
260kब्राउज़र के ऐसे खेल-भरे डेमो बनाती है जहां टेक्स्ट चलती आकृतियों के चारों ओर बहता है, गेम लेवल बनाता है, या कणों में टूट जाता है।
page-agent
260kआपके एजेंट को वेब ऐप में अंतर्निहित AI सहायक जोड़ने में मदद करती है, ताकि उपयोगकर्ता सादी भाषा में आदेश दे सकें, जिन्हें पेज पूरा करे।