better-accessibility
ما الذي تفعله
يرشد الوكيل إلى بناء الواجهات ومراجعتها لتعمل مع مستخدمي لوحة المفاتيح ومستخدمي قارئات الشاشة. وهي مناسبة للمصممين والمطورين الذين يبنون واجهات الويب.
متى تستخدمها
- ✓عندما تبني نافذة منبثقة أو قائمة أو نموذجا أو عنصرا مخصصا يحتاج إلى دعم لوحة المفاتيح.
- ✓عندما يبلغ أحد عن مشكلات في لوحة المفاتيح أو قارئ الشاشة في واجهتك.
- ✓عندما تريد مراجعة إمكانية الوصول لصفحة أو مكون.
رابط المهارة
https://github.com/trycompai/crm/blob/release/.agents/skills/better-accessibility/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“هل تستطيع جعل قائمة الاختيار المنسدلة هذه قابلة للاستخدام بلوحة المفاتيح وقارئات الشاشة؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يفحص الوكيل الواجهة أولا كمستخدم لوحة مفاتيح، ثم كمستخدم لقارئ شاشة، ويفضّل العناصر الأصلية على العناصر المخصصة المزودة بتسميات إضافية.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
Accessibility that comes with the craft
Accessibility is not a compliance checkbox bolted on at the end; it is the floor for interface craft. Most of it is free if you use the platform: native elements ship with keyboard support, real labels announce themselves, and a visible focus ring is one CSS rule. Apply these principles when building or reviewing UI code, and match the project's existing styling system (Tailwind vs. plain CSS vs. CSS-in-JS) when applying fixes.
When reviewing, walk the interface as a keyboard-only user first (every flow must complete without a mouse), then as a screen-reader user: does each control announce a name, a role, and its state? When unsure, prefer the platform default over a custom rebuild, and remove ARIA rather than add it.
Rendered-pair contrast measurement and color remediation are covered by the better-colors skill; visual text sizing and iOS input zoom by better-typography; spatial RTL layout by better-layout.
Quick Reference
| Category | When to Use |
|---|---|
| Focus & Keyboard | Focus rings, skip links, tabindex, focus trapping, APG keyboard patterns |
| Semantics & ARIA | Native elements first, button vs link, landmarks, accessible names, disabled states |
| Forms | Labels, autocomplete, error messaging, input types |
| Screen Readers | Visually hidden content, live regions, toasts, alt text, SVG |
| Hit Areas | Target sizes, expanding hit areas, collision rules |
| Motion & Zoom | prefers-reduced-motion, autoplay and timed UI, 200% zoom, reflow, rem vs px |
Core Principles
1. Native Elements First
The first rule of ARIA: don't use ARIA when a native element exists. <button> for actions, <a href> for navigation (it must support Cmd/Ctrl/middle-click), never <div onClick>. No ARIA is better than bad ARIA.
2. Visible Focus Rings
Style :focus-visible, not bare :focus, so keyboard users get a ring and mouse users usually don't. Prefer the browser's unmodified focus indicator. If the design needs a custom ring, use a project focus token or another explicit color and verify the complete indicator against every adjacent color it crosses; currentColor is acceptable only after the same check. Use at least a 2px solid perimeter or an equivalent visible area. Never use outline: none without a verified replacement, and preserve system colors in forced-colors mode.
3. Full Keyboard Support
Every pointer interaction needs a keyboard path, following the ARIA APG patterns: Escape closes overlays, arrow keys move within composite widgets (tabs, menus, listboxes), Tab moves between widgets, Enter and Space activate. Only tabindex="0" (join the natural tab order) and tabindex="-1" (programmatic focus), never positive values, which break the natural order. Composite widgets use roving tabindex: the active item is 0, all others -1.
4. Trap and Restore Focus
Modals set inert on the background content, move focus inside on open, and return focus to the trigger on close. Add overscroll-behavior: contain so background content doesn't scroll.
5. Minimum Hit Area
WCAG 2.5.8's Level AA baseline is a 24×24 CSS-pixel target or one of its defined spacing, equivalent-control, inline, user-agent, or essential exceptions. For easier activation, aim for 44×44px in touch contexts and 40×40px in desktop interfaces when density permits. Extend with a pseudo-element if the visible element should stay smaller. Never let extended hit areas overlap.
6. Label and Type Every Control
Every input gets a <label for> or wrapping <label>; a placeholder is never a label, and label and control share one hit target: no dead zones between a checkbox and its text. Add autocomplete with a meaningful name, and the correct type and inputmode for the keyboard. Never block paste; users paste passwords and one-time codes.
7. Errors That Announce
Keep submit enabled until the request starts, then disable with a spinner while keeping the original label. Validate on submit: mark failing fields with aria-invalid="true", point aria-describedby at the inline error text, and focus the first invalid field. Use native disabled when a native control is genuinely unavailable. Use aria-disabled="true" only when retaining focusability or discoverability is intentional; then block pointer, keyboard, and form behav
الأسئلة الشائعة
هل تغطي تباين الألوان؟
لا. يتولى مهارة better-colors تباين الألوان.
هل يجب إضافة سمات ARIA دائما؟
لا. تقول المهارة إنه يُفضّل السلوك الأصلي للمنصة، ويُزال ARIA بدلا من إضافته حيثما أمكن.
هل تغطي النماذج؟
نعم. تغطي التسميات والإكمال التلقائي ورسائل الخطأ وأنواع المدخلات.
التفاصيل
الوصف الأصلي من المؤلف
Accessibility engineering for product interfaces, from focus states and keyboard support to ARIA, forms, and screen readers. Use when building or reviewing UI components, modals, menus, forms, custom widgets, or when the user says "make this accessible" or reports keyboard or screen-reader issues. Triggers on accessibility, a11y, WCAG, aria, focus ring, focus-visible, focus trap, keyboard navigation, tab order, tabindex, screen reader, sr-only, aria-live, alt text, hit area, touch target, prefers-reduced-motion, autoplay, toast duration, skip link, semantic HTML, aria-label, form errors, disab
repo: trycompai/crm
الشعبية
- نجوم GitHub
- 12k
- الترتيب
- #11508
- الترخيص
- MIT
- آخر تحديث
- 1/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
ai-elements
12kيساعد وكيلك على بناء واجهات دردشة بالذكاء الاصطناعي بمكونات جاهزة للمحادثات والرسائل وعرض الأدوات وحقول الأوامر.
ai-sdk
12kيساعد وكيلك على بناء ميزات ذكاء اصطناعي بـ Vercel AI SDK، بما فيها توليد النصوص والبث المباشر واستدعاء الأدوات والوكلاء.
better-auth-best-practices
12kيساعد وكيلك على إعداد Better Auth لتسجيل الدخول والجلسات وOAuth والإضافات في تطبيق TypeScript، باتباع خطواته الموثقة.
better-colors
12kيساعد وكيلك على تحويل الألوان واختيارها وفحصها لواجهة الويب، بما فيها لوحات OKLCH والتباين والوضع الداكن.
مهارات مشابهة
canvas
394kيتيح لوكيلك عرض أداة مرئية مستضافة على لوحة Mac متصلة، ثم إخفاء اللوحة أو نقلها إلى صفحة أخرى.
control-ui
394kيساعد وكيلك على تنظيم واجهة OpenClaw Control UI واستكشاف أخطائها، بما في ذلك الجلسات ولوحات المعلومات وبوابات Gateway المتصلة.
diagram-maker
394kيساعد وكيلك على إنشاء مخططات واضحة بصيغة SVG أو HTML أو Excalidraw قابلة للتعديل، للعمليات وبنية الأنظمة والرسومات على السبورة.