تخطَّ إلى المحتوى
أمرمستورد

svelte-a11y

Audit and improve accessibility in Svelte/SvelteKit applications, ensuring WCAG compliance and inclusive user experiences.

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

الملفات: 1 · الحجم: 3.7 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

بعد التنزيل، شغّل الأمر في الطرفية. يسأل unzip قبل أن يستبدل أي ملف موجود.

  • لهذا المشروع

    يوضع في: .claude/commands/

    mkdir -p .claude/commands && unzip ~/Downloads/svelte-a11y.zip -d .claude/commands

  • لحسابك على الجهاز كله

    يوضع في: ~/.claude/commands/

    mkdir -p ~/.claude/commands && unzip ~/Downloads/svelte-a11y.zip -d ~/.claude/commands

التعليمات

/svelte:a11y

Audit and improve accessibility in Svelte/SvelteKit applications, ensuring WCAG compliance and inclusive user experiences.

Instructions

You are acting as the Svelte Development Agent focused on accessibility. When improving accessibility:

  1. Accessibility Audit:

    • Run automated accessibility tests
    • Check WCAG 2.1 AA/AAA compliance
    • Test with screen readers
    • Verify keyboard navigation
    • Analyze color contrast
    • Review ARIA usage
  2. Common Issues & Fixes:

    Component Accessibility:

    <!-- Bad -->
    <div onclick={handleClick}>Click me</div>
    
    <!-- Good -->
    <button onclick={handleClick} aria-label="Action description">
      Click me
    </button>
    

    Form Accessibility:

    <label for="email">Email Address</label>
    <input 
      id="email"
      type="email"
      required
      aria-describedby="email-error"
    />
    {#if errors.email}
      <span id="email-error" role="alert">
        {errors.email}
      </span>
    {/if}
    
  3. Navigation & Focus:

    // Skip links
    <a href="#main" class="skip-link">Skip to main content</a>
    
    // Focus management
    onMount(() => {
      if (shouldFocus) {
        element.focus();
      }
    });
    
    // Keyboard navigation
    function handleKeydown(event) {
      if (event.key === 'Escape') {
        closeModal();
      }
    }
    
  4. ARIA Implementation:

    • Use semantic HTML first
    • Add ARIA labels for clarity
    • Implement live regions
    • Manage focus properly
    • Announce dynamic changes
  5. Testing Tools:

    • Svelte a11y warnings
    • axe-core integration
    • Pa11y CI setup
    • Screen reader testing
    • Keyboard navigation testing
  6. Accessibility Checklist:

    • All interactive elements keyboard accessible
    • Proper heading hierarchy
    • Images have alt text
    • Color contrast meets standards
    • Forms have proper labels
    • Error messages announced
    • Focus indicators visible
    • Page has unique title
    • Landmarks properly used
    • Animations respect prefers-reduced-motion

Example Usage

User: "Audit my e-commerce site for accessibility issues"

Assistant will:

  • Run automated accessibility scan
  • Check product cards for proper markup
  • Verify cart keyboard navigation
  • Test checkout form accessibility
  • Review color contrast on CTAs
  • Add ARIA labels where needed
  • Implement focus management
  • Create accessibility test suite
  • Provide WCAG compliance report

الملفات

  • LICENSE1 ك.ب
  • svelte-a11y.md2.6 ك.ب

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • أمرمستورد

    accessibility-audit

    Audit web accessibility for WCAG compliance with automated axe-core tests, keyboard and screen reader checks, and remediation guidance

    MITالملفات: 1

  • أمرمستورد

    component-scaffold

    Scaffold React and React Native components with TypeScript, tests, styles, and Storybook stories

    MITالملفات: 1

  • أمرمستورد

    create-component

    Guided component creation with proper patterns

    MITالملفات: 1

  • أمرمستورد

    create-plugin

    Guided end-to-end plugin creation workflow with component design, implementation, and validation

    Apache-2.0الملفات: 1

  • أمرمستورد

    gws-events-renew

    Google Workspace Events: Renew/reactivate Workspace Events subscriptions.

    MITالملفات: 1