focus-management
यह क्या करती है
यह स्किल जाँचती है कि विंडो खुलने, बंद होने या अपडेट होने पर कीबोर्ड फ़ोकस कहाँ जाता है। यह modals, menus और single-page apps बनाने वाले डेवलपर्स के लिए है।
कब इस्तेमाल करें
- ✓जब पॉप-अप खुले पर कीबोर्ड फ़ोकस उसके पीछे रह जाए।
- ✓जब डायलॉग बंद करने पर फ़ोकस किसी अनपेक्षित जगह चला जाए।
- ✓जब single-page app व्यू बदले और कीबोर्ड उपयोगकर्ता खो जाएँ।
Skill का लिंक
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/focus-management/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप सुनिश्चित कर सकते हैं कि मेरा modal खुलने और बंद होने पर कीबोर्ड फ़ोकस सही जगह जाए?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट जाँचता है कि खुलने और बंद होने पर फ़ोकस कैसे चलता है, और क्या वह modal के भीतर रहता है। वह फ़ोकस को डायलॉग के अंदर ले जाने, वहीं रखने और बंद होने पर उस बटन पर लौटाने का सुझाव देता है जिसने उसे खोला था।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Manage focus during dynamic interactions
Poor focus management leaves keyboard users stranded—they can't find new content, get trapped in closed modals, or lose their place entirely after interactions.
Quick Reference
- Move focus to modal when opened, return to trigger when closed
- Focus new content after SPA navigation or dynamic updates
- Use tabindex='-1' to make non-interactive elements focusable
- Never lose focus to an unexpected location
Check
Verify that focus is properly managed when opening/closing modals, navigating between views, or updating content dynamically.
Fix
Implement proper focus management using tabindex, focus(), and focus trapping for modal dialogs.
Explain
Explain how proper focus management ensures keyboard and screen reader users can navigate dynamic interfaces effectively.
Code Review
Review the rendered markup and interactive states that affect Manage focus during dynamic interactions. 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/focus-management
अक्सर पूछे जाने वाले सवाल
modal खुलने पर फ़ोकस कहाँ जाना चाहिए?
स्किल उसे modal के अंदर ले जाने, और modal बंद होने पर उस बटन पर वापस लाने का सुझाव देती है जिसने उसे खोला था।
focus trap क्या है?
यह कीबोर्ड फ़ोकस को डायलॉग के भीतर तब तक रखता है जब तक वह बंद न हो, ताकि उपयोगकर्ता छिपी पेज सामग्री पर Tab न जाएँ।
tabindex -1 क्या करता है?
स्किल कहती है कि यह गैर-interactive एलिमेंट्स को कोड से फ़ोकस लेने देता है, सामान्य tab क्रम में शामिल किए बिना।
जानकारी
लेखक का मूल विवरण
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Manage focus during dynamic interactions. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
लोकप्रियता
- GitHub स्टार
- 75k
- रैंकिंग में स्थान
- #2849
- लाइसेंस
- 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 फॉलो करवाता है।