+ )
+}
+```
+
+## Features to Include
+
+- **Sorting**: Click column headers to sort
+- **Filtering**: Global search and column filters
+- **Pagination**: Navigate through pages
+- **Selection**: Select individual or all rows
+- **Column Visibility**: Show/hide columns
+- **Row Actions**: Edit, delete, view details
+- **Export**: CSV/Excel export
+- **Responsive**: Mobile-friendly view
+
+## Example
+
+If the user says: `/create-data-table users`
+
+1. Install dependencies:
+```bash
+npm install @tanstack/react-table
+npx shadcn@latest add table button input dropdown-menu checkbox
+```
+
+2. Create column definitions for users table
+3. Create data table component
+4. Add pagination component
+5. Add column visibility toggle
+6. Provide usage example
\ No newline at end of file
diff --git a/ui/shadcn/.claude/commands/create-variant.md b/ui/shadcn/.claude/commands/create-variant.md
new file mode 100644
index 0000000..03279b7
--- /dev/null
+++ b/ui/shadcn/.claude/commands/create-variant.md
@@ -0,0 +1,68 @@
+---
+description: Add a new variant to an existing shadcn/ui component
+argument-hint: =
+allowed-tools: Read, Edit, MultiEdit
+---
+
+Add a new variant to an existing shadcn/ui component using CVA (class-variance-authority).
+
+## Instructions
+
+1. Locate the component file in `components/ui/[component].tsx`
+2. Find the existing CVA variants configuration
+3. Add the new variant to the appropriate variant type
+4. Update TypeScript types if needed
+5. Provide usage example of the new variant
+
+## Arguments
+
+- `component-name`: The component to modify (e.g., `button`, `card`)
+- `variant-type`: The type of variant (`variant`, `size`, or custom)
+- `variant-name`: The name of the new variant
+
+## Example
+
+If the user says: `/create-variant button size=xl`
+
+1. Open `components/ui/button.tsx`
+2. Find the `buttonVariants` CVA configuration
+3. Add to the `size` variants:
+
+```tsx
+const buttonVariants = cva(
+ "...",
+ {
+ variants: {
+ variant: { ... },
+ size: {
+ default: "h-9 px-4 py-2",
+ sm: "h-8 rounded-md px-3 text-xs",
+ lg: "h-10 rounded-md px-8",
+ icon: "h-9 w-9",
+ // NEW VARIANT
+ xl: "h-12 rounded-md px-10 text-lg",
+ },
+ },
+ }
+)
+```
+
+4. Show usage:
+```tsx
+
+```
+
+## Common Variant Types
+
+- **variant**: Visual style (default, destructive, outline, secondary, ghost, link)
+- **size**: Component size (sm, default, lg, xl)
+- **state**: Interactive state (active, disabled, loading)
+- **theme**: Theme-specific (brand, success, warning, info)
+
+## Best Practices
+
+1. Keep variant names consistent across components
+2. Update TypeScript types when adding variants
+3. Test the variant with all other variant combinations
+4. Ensure accessibility is maintained
+5. Document the new variant in comments
\ No newline at end of file
diff --git a/ui/shadcn/.claude/commands/migrate-component.md b/ui/shadcn/.claude/commands/migrate-component.md
new file mode 100644
index 0000000..30f763f
--- /dev/null
+++ b/ui/shadcn/.claude/commands/migrate-component.md
@@ -0,0 +1,239 @@
+---
+description: Migrate existing component to shadcn/ui patterns
+argument-hint:
+allowed-tools: Read, Write, Edit, MultiEdit, Bash
+---
+
+Convert an existing component to follow shadcn/ui patterns and best practices.
+
+## Instructions
+
+1. Analyze the existing component
+2. Identify required shadcn/ui dependencies
+3. Refactor to use:
+ - CVA for variants
+ - cn() for class merging
+ - Radix UI primitives (if applicable)
+ - Proper TypeScript types
+ - forwardRef pattern
+ - Accessibility attributes
+4. Maintain backward compatibility where possible
+5. Create migration guide
+
+## Migration Patterns
+
+### From Styled Components/Emotion
+```tsx
+// ❌ Before - Styled Components
+const StyledButton = styled.button`
+ background: ${props => props.primary ? 'blue' : 'gray'};
+ color: white;
+ padding: 10px 20px;
+ &:hover {
+ opacity: 0.8;
+ }
+`
+
+// ✅ After - shadcn/ui pattern
+import { cva, type VariantProps } from "class-variance-authority"
+import { cn } from "@/lib/utils"
+
+const buttonVariants = cva(
+ "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2",
+ {
+ variants: {
+ variant: {
+ primary: "bg-blue-600 text-white hover:bg-blue-700",
+ secondary: "bg-gray-600 text-white hover:bg-gray-700",
+ },
+ },
+ defaultVariants: {
+ variant: "primary",
+ },
+ }
+)
+
+const Button = React.forwardRef<
+ HTMLButtonElement,
+ React.ButtonHTMLAttributes &
+ VariantProps
+>(({ className, variant, ...props }, ref) => {
+ return (
+
+ )
+})
+Button.displayName = "Button"
+```
+
+### From Material-UI/Ant Design
+```tsx
+// ❌ Before - MUI
+import { Button, TextField, Dialog } from '@mui/material'
+
+
+
+// ✅ After - shadcn/ui
+import {
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogFooter,
+ DialogHeader,
+ DialogTitle,
+} from "@/components/ui/dialog"
+import { Input } from "@/components/ui/input"
+import { Label } from "@/components/ui/label"
+import { Button } from "@/components/ui/button"
+
+
+```
+
+### From Bootstrap/Traditional CSS
+```tsx
+// ❌ Before - Bootstrap classes
+
+
+
Title
+
+
+
Content
+
+
+
+
+// ✅ After - shadcn/ui
+import {
+ Card,
+ CardContent,
+ CardDescription,
+ CardFooter,
+ CardHeader,
+ CardTitle,
+} from "@/components/ui/card"
+import { Button } from "@/components/ui/button"
+
+
+
+ Title
+
+
+
Content
+
+
+
+
+
+```
+
+## Migration Checklist
+
+### Structure
+- [ ] Convert to functional component
+- [ ] Add forwardRef if needed
+- [ ] Add displayName
+- [ ] Export component and variants
+
+### Styling
+- [ ] Replace CSS-in-JS with Tailwind classes
+- [ ] Implement CVA for variants
+- [ ] Use cn() for class merging
+- [ ] Convert theme tokens to CSS variables
+
+### Types
+- [ ] Add proper TypeScript interfaces
+- [ ] Extend HTML element props
+- [ ] Add VariantProps type
+- [ ] Export types separately
+
+### Behavior
+- [ ] Replace UI library with Radix primitives
+- [ ] Add asChild support if applicable
+- [ ] Implement controlled/uncontrolled patterns
+- [ ] Add proper event handlers
+
+### Accessibility
+- [ ] Add ARIA attributes
+- [ ] Ensure keyboard navigation
+- [ ] Add focus management
+- [ ] Include screen reader support
+
+## Common Replacements
+
+| Old Library | shadcn/ui Replacement |
+|------------|----------------------|
+| MUI Button | Button with variants |
+| Ant Select | Select with Radix |
+| Bootstrap Modal | Dialog component |
+| Chakra Menu | DropdownMenu |
+| Semantic UI Form | Form with React Hook Form |
+
+## Migration Guide Template
+
+```markdown
+# Migration Guide: [ComponentName]
+
+## Breaking Changes
+- Changed prop: `color` → `variant`
+- Removed prop: `size="medium"` (now default)
+- New required prop: `asChild` for composition
+
+## API Changes
+```tsx
+// Before
+
+
+// After
+
+```
+
+## Styling Changes
+- Uses Tailwind classes instead of CSS modules
+- Theme variables now use CSS custom properties
+- Dark mode handled automatically
+
+## Usage Examples
+[Provide before/after examples]
+```
+
+## Example
+
+If the user says: `/migrate-component components/CustomButton.jsx`
+
+1. Read and analyze CustomButton.jsx
+2. Identify styling system used
+3. Create new button following shadcn patterns:
+ - Add CVA variants
+ - Convert styles to Tailwind
+ - Add proper TypeScript types
+ - Include forwardRef
+4. Test compatibility
+5. Provide migration guide
\ No newline at end of file
diff --git a/ui/shadcn/.claude/commands/optimize-bundle.md b/ui/shadcn/.claude/commands/optimize-bundle.md
new file mode 100644
index 0000000..3a820f3
--- /dev/null
+++ b/ui/shadcn/.claude/commands/optimize-bundle.md
@@ -0,0 +1,220 @@
+---
+description: Analyze and optimize bundle size
+argument-hint:
+allowed-tools: Bash, Read, Edit, MultiEdit
+---
+
+Analyze bundle size and optimize for production.
+
+## Instructions
+
+1. Run bundle analysis
+2. Identify large dependencies
+3. Find unused code
+4. Implement optimization strategies
+5. Generate optimization report
+
+## Analysis Tools
+
+### Next.js
+```bash
+# Install bundle analyzer
+npm install -D @next/bundle-analyzer
+
+# Configure next.config.js
+const withBundleAnalyzer = require('@next/bundle-analyzer')({
+ enabled: process.env.ANALYZE === 'true',
+})
+
+module.exports = withBundleAnalyzer({
+ // your config
+})
+
+# Run analysis
+ANALYZE=true npm run build
+```
+
+### Vite
+```bash
+# Install rollup plugin
+npm install -D rollup-plugin-visualizer
+
+# Add to vite.config.ts
+import { visualizer } from 'rollup-plugin-visualizer'
+
+plugins: [
+ visualizer({
+ open: true,
+ gzipSize: true,
+ brotliSize: true,
+ })
+]
+
+# Run build
+npm run build
+```
+
+### General
+```bash
+# webpack-bundle-analyzer
+npm install -D webpack-bundle-analyzer
+
+# source-map-explorer
+npm install -D source-map-explorer
+npm run build
+npx source-map-explorer 'build/static/js/*.js'
+```
+
+## Optimization Strategies
+
+### 1. Code Splitting
+```tsx
+// Dynamic imports
+const HeavyComponent = lazy(() => import('./HeavyComponent'))
+
+// Route-based splitting (Next.js)
+export default function Page() {
+ return
Auto code-split by route
+}
+
+// Conditional loading
+if (userNeedsFeature) {
+ const module = await import('./feature')
+ module.initialize()
+}
+```
+
+### 2. Tree Shaking
+```tsx
+// ❌ Bad - imports entire library
+import _ from 'lodash'
+
+// ✅ Good - imports only what's needed
+import debounce from 'lodash/debounce'
+
+// For shadcn/ui - already optimized!
+// Components are copied, not imported from package
+```
+
+### 3. Component Optimization
+```tsx
+// Memoize expensive components
+const MemoizedComponent = memo(ExpensiveComponent)
+
+// Lazy load heavy components
+const Chart = lazy(() => import('./Chart'))
+
+}>
+
+
+```
+
+### 4. Asset Optimization
+```tsx
+// Next.js Image optimization
+import Image from 'next/image'
+
+
+
+// Font optimization
+import { Inter } from 'next/font/google'
+
+const inter = Inter({
+ subsets: ['latin'],
+ display: 'swap',
+})
+```
+
+### 5. Dependency Optimization
+```json
+// Use lighter alternatives
+{
+ "dependencies": {
+ // "moment": "^2.29.0", // 67kb
+ "date-fns": "^2.29.0", // 13kb (tree-shakeable)
+
+ // "lodash": "^4.17.0", // 71kb
+ "lodash-es": "^4.17.0", // Tree-shakeable
+ }
+}
+```
+
+### 6. Tailwind CSS Optimization
+```js
+// tailwind.config.js
+module.exports = {
+ content: [
+ // Be specific to avoid scanning unnecessary files
+ './app/**/*.{js,ts,jsx,tsx}',
+ './components/**/*.{js,ts,jsx,tsx}',
+ ],
+ // Remove unused styles in production
+ purge: process.env.NODE_ENV === 'production' ? [
+ './app/**/*.{js,ts,jsx,tsx}',
+ './components/**/*.{js,ts,jsx,tsx}',
+ ] : [],
+}
+```
+
+## Optimization Checklist
+
+- [ ] Enable production mode
+- [ ] Remove console.logs and debug code
+- [ ] Minify JavaScript and CSS
+- [ ] Enable gzip/brotli compression
+- [ ] Optimize images (WebP, AVIF)
+- [ ] Lazy load non-critical resources
+- [ ] Use CDN for static assets
+- [ ] Implement caching strategies
+- [ ] Remove unused dependencies
+- [ ] Tree shake imports
+
+## Report Format
+
+```markdown
+# Bundle Optimization Report
+
+## Current Stats
+- Total bundle size: XXXkb
+- Gzipped size: XXXkb
+- Largest chunks: [...]
+
+## Issues Found
+1. Large dependency: [package] (XXXkb)
+2. Duplicate code in: [files]
+3. Unused exports in: [modules]
+
+## Optimizations Applied
+1. ✅ Code split [component]
+2. ✅ Lazy loaded [routes]
+3. ✅ Replaced [heavy-lib] with [light-lib]
+
+## Results
+- Bundle size reduced by: XX%
+- Initial load improved by: XXms
+- Lighthouse score: XX → XX
+
+## Recommendations
+1. Consider replacing...
+2. Lazy load...
+3. Split chunk for...
+```
+
+## Example
+
+If the user says: `/optimize-bundle`
+
+1. Analyze current bundle size
+2. Identify optimization opportunities:
+ - Large dependencies to replace
+ - Components to lazy load
+ - Unused code to remove
+3. Implement optimizations
+4. Re-analyze and compare results
+5. Generate detailed report
\ No newline at end of file
diff --git a/ui/shadcn/.claude/commands/setup-dark-mode.md b/ui/shadcn/.claude/commands/setup-dark-mode.md
new file mode 100644
index 0000000..c9867b6
--- /dev/null
+++ b/ui/shadcn/.claude/commands/setup-dark-mode.md
@@ -0,0 +1,243 @@
+---
+description: Configure dark mode for your framework
+argument-hint: "[framework]"
+allowed-tools: Read, Write, Edit, Bash
+---
+
+Set up dark mode with theme switching for your specific framework.
+
+## Instructions
+
+Based on the framework detected or specified:
+1. Install required dependencies
+2. Set up theme provider
+3. Configure CSS variables
+4. Create theme toggle component
+5. Set up persistence (cookies/localStorage)
+
+## Framework Configurations
+
+### Next.js (App Router)
+```bash
+npm install next-themes
+```
+
+Create `components/theme-provider.tsx`:
+```tsx
+"use client"
+
+import * as React from "react"
+import { ThemeProvider as NextThemesProvider } from "next-themes"
+import { type ThemeProviderProps } from "next-themes/dist/types"
+
+export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
+ return {children}
+}
+```
+
+Wrap in `app/layout.tsx`:
+```tsx
+
+ {children}
+
+```
+
+### Vite
+Create `components/theme-provider.tsx`:
+```tsx
+import { createContext, useContext, useEffect, useState } from "react"
+
+type Theme = "dark" | "light" | "system"
+
+const ThemeProviderContext = createContext<{
+ theme: Theme
+ setTheme: (theme: Theme) => void
+}>({
+ theme: "system",
+ setTheme: () => null,
+})
+
+export function ThemeProvider({ children }: { children: React.ReactNode }) {
+ const [theme, setTheme] = useState(
+ () => (localStorage.getItem("theme") as Theme) || "system"
+ )
+
+ useEffect(() => {
+ const root = window.document.documentElement
+ root.classList.remove("light", "dark")
+
+ if (theme === "system") {
+ const systemTheme = window.matchMedia("(prefers-color-scheme: dark)")
+ .matches
+ ? "dark"
+ : "light"
+ root.classList.add(systemTheme)
+ return
+ }
+
+ root.classList.add(theme)
+ }, [theme])
+
+ const value = {
+ theme,
+ setTheme: (theme: Theme) => {
+ localStorage.setItem("theme", theme)
+ setTheme(theme)
+ },
+ }
+
+ return (
+
+ {children}
+
+ )
+}
+
+export const useTheme = () => {
+ const context = useContext(ThemeProviderContext)
+ if (context === undefined)
+ throw new Error("useTheme must be used within a ThemeProvider")
+ return context
+}
+```
+
+### Remix
+```bash
+npm install remix-themes
+```
+
+In `app/root.tsx`:
+```tsx
+import { themeSessionResolver } from "remix-themes"
+import {
+ PreventFlashOnWrongTheme,
+ ThemeProvider,
+ useTheme,
+} from "remix-themes"
+
+export async function loader({ request }: LoaderFunctionArgs) {
+ const { getTheme } = await themeSessionResolver(request)
+ return { theme: getTheme() }
+}
+
+export default function App() {
+ const data = useLoaderData()
+ const [theme] = useTheme()
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ )
+}
+```
+
+### Astro
+In layout file:
+```astro
+
+```
+
+## Theme Toggle Component
+
+Create `components/theme-toggle.tsx`:
+```tsx
+import { Moon, Sun } from "lucide-react"
+import { Button } from "@/components/ui/button"
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuTrigger,
+} from "@/components/ui/dropdown-menu"
+import { useTheme } from "@/components/theme-provider" // or "next-themes"
+
+export function ThemeToggle() {
+ const { setTheme } = useTheme()
+
+ return (
+
+
+
+
+
+ setTheme("light")}>
+ Light
+
+ setTheme("dark")}>
+ Dark
+
+ setTheme("system")}>
+ System
+
+
+
+ )
+}
+```
+
+## CSS Configuration
+
+Ensure `globals.css` has:
+```css
+@layer base {
+ :root {
+ --background: 0 0% 100%;
+ --foreground: 222.2 84% 4.9%;
+ /* ... other variables ... */
+ }
+
+ .dark {
+ --background: 222.2 84% 4.9%;
+ --foreground: 210 40% 98%;
+ /* ... other variables ... */
+ }
+}
+```
+
+## Example
+
+If the user says: `/setup-dark-mode next`
+
+1. Install next-themes
+2. Create ThemeProvider component
+3. Wrap app in ThemeProvider
+4. Create ThemeToggle component
+5. Add to navigation/header
+6. Test theme switching
\ No newline at end of file
diff --git a/ui/shadcn/.claude/commands/setup-form.md b/ui/shadcn/.claude/commands/setup-form.md
new file mode 100644
index 0000000..068a80f
--- /dev/null
+++ b/ui/shadcn/.claude/commands/setup-form.md
@@ -0,0 +1,126 @@
+---
+description: Set up a form with React Hook Form and Zod validation
+argument-hint:
+allowed-tools: Read, Write, Edit, Bash
+---
+
+Create a complete form setup with React Hook Form, Zod validation, and shadcn/ui form components.
+
+## Instructions
+
+1. Install required dependencies if not present:
+ - `react-hook-form`
+ - `@hookform/resolvers`
+ - `zod`
+ - Required shadcn components: `form`, `input`, `button`, etc.
+
+2. Create the form with:
+ - Zod schema for validation
+ - Form component with React Hook Form
+ - Proper error handling
+ - Loading states
+ - Success feedback
+
+## Template Structure
+
+```tsx
+// lib/validations/[form-name].ts
+import * as z from "zod"
+
+export const [formName]Schema = z.object({
+ // Define fields
+})
+
+export type [FormName]Values = z.infer
+
+// components/forms/[form-name]-form.tsx
+import { useForm } from "react-hook-form"
+import { zodResolver } from "@hookform/resolvers/zod"
+import { [formName]Schema, type [FormName]Values } from "@/lib/validations/[form-name]"
+import {
+ Form,
+ FormControl,
+ FormDescription,
+ FormField,
+ FormItem,
+ FormLabel,
+ FormMessage,
+} from "@/components/ui/form"
+import { Input } from "@/components/ui/input"
+import { Button } from "@/components/ui/button"
+import { toast } from "@/components/ui/use-toast"
+
+export function [FormName]Form() {
+ const form = useForm<[FormName]Values>({
+ resolver: zodResolver([formName]Schema),
+ defaultValues: {
+ // Set defaults
+ },
+ })
+
+ async function onSubmit(data: [FormName]Values) {
+ try {
+ // Handle submission
+ toast({
+ title: "Success",
+ description: "Form submitted successfully",
+ })
+ } catch (error) {
+ toast({
+ title: "Error",
+ description: "Something went wrong",
+ variant: "destructive",
+ })
+ }
+ }
+
+ return (
+
+
+ )
+}
+```
+
+## Common Form Types
+
+- **contact-form**: Name, email, message
+- **login-form**: Email/username, password
+- **register-form**: Name, email, password, confirm password
+- **profile-form**: Avatar, bio, social links
+- **settings-form**: Preferences, notifications
+- **checkout-form**: Billing, shipping, payment
+
+## Field Types to Consider
+
+- Text inputs (email, url, tel, password)
+- Textareas for long text
+- Select dropdowns
+- Radio groups
+- Checkboxes
+- Date pickers
+- File uploads
+- Number inputs with validation
+
+## Example
+
+If the user says: `/setup-form contact`
+
+1. Install dependencies:
+```bash
+npm install react-hook-form @hookform/resolvers zod
+npx shadcn@latest add form input textarea button
+```
+
+2. Create validation schema
+3. Create form component with name, email, message fields
+4. Add proper validation rules
+5. Include submit handler with loading state
\ No newline at end of file
diff --git a/ui/shadcn/.claude/hooks/check-accessibility.sh b/ui/shadcn/.claude/hooks/check-accessibility.sh
new file mode 100755
index 0000000..24be077
--- /dev/null
+++ b/ui/shadcn/.claude/hooks/check-accessibility.sh
@@ -0,0 +1,197 @@
+#!/bin/bash
+
+# Check accessibility compliance after component modifications
+# This hook runs after Write/Edit/MultiEdit operations
+
+# Colors for output
+RED='\033[0;31m'
+YELLOW='\033[1;33m'
+GREEN='\033[0;32m'
+BLUE='\033[0;34m'
+NC='\033[0m' # No Color
+
+# Read tool result from stdin
+TOOL_RESULT=$(cat)
+TOOL_NAME=$(echo "$TOOL_RESULT" | jq -r '.tool_name // empty' 2>/dev/null)
+
+# Only process if it's a file modification tool
+if [[ "$TOOL_NAME" != "Write" ]] && [[ "$TOOL_NAME" != "Edit" ]] && [[ "$TOOL_NAME" != "MultiEdit" ]]; then
+ echo "$TOOL_RESULT"
+ exit 0
+fi
+
+# Extract file path
+FILE_PATH=$(echo "$TOOL_RESULT" | jq -r '.tool_input.file_path // empty' 2>/dev/null)
+
+# Only process component files
+if [[ ! "$FILE_PATH" =~ \.(tsx?|jsx?)$ ]] || [[ ! "$FILE_PATH" =~ component ]]; then
+ echo "$TOOL_RESULT"
+ exit 0
+fi
+
+# Check if file exists
+if [ ! -f "$FILE_PATH" ]; then
+ echo "$TOOL_RESULT"
+ exit 0
+fi
+
+echo -e "${BLUE}🔍 Checking accessibility in $FILE_PATH...${NC}" >&2
+
+# Initialize counters
+ISSUES=0
+WARNINGS=0
+
+# Function to check patterns
+check_pattern() {
+ local pattern="$1"
+ local message="$2"
+ local type="$3" # "error" or "warning"
+
+ if grep -q "$pattern" "$FILE_PATH"; then
+ if [ "$type" = "error" ]; then
+ echo -e "${RED}❌ A11y Issue: $message${NC}" >&2
+ ((ISSUES++))
+ else
+ echo -e "${YELLOW}⚠️ A11y Warning: $message${NC}" >&2
+ ((WARNINGS++))
+ fi
+ return 1
+ fi
+ return 0
+}
+
+# Function to check for missing patterns
+check_missing() {
+ local pattern="$1"
+ local context="$2"
+ local message="$3"
+
+ if grep -q "$context" "$FILE_PATH"; then
+ if ! grep -q "$pattern" "$FILE_PATH"; then
+ echo -e "${YELLOW}⚠️ A11y Warning: $message${NC}" >&2
+ ((WARNINGS++))
+ return 1
+ fi
+ fi
+ return 0
+}
+
+# Check for interactive elements without keyboard support
+if grep -qE '<(button|a|input|select|textarea)' "$FILE_PATH"; then
+ # Check for onClick without onKeyDown/onKeyPress
+ if grep -q 'onClick=' "$FILE_PATH"; then
+ if ! grep -qE '(onKeyDown|onKeyPress|onKeyUp)=' "$FILE_PATH"; then
+ echo -e "${YELLOW}⚠️ A11y Warning: onClick handlers should have keyboard alternatives${NC}" >&2
+ ((WARNINGS++))
+ fi
+ fi
+
+ # Check for proper button usage
+ if grep -q ' instead of
with onClick for interactive elements${NC}" >&2
+ ((WARNINGS++))
+ fi
+fi
+
+# Check for images without alt text
+if grep -qE ']*>' "$FILE_PATH"; then
+ IMG_TAGS=$(grep -o ']*>' "$FILE_PATH")
+ while IFS= read -r img; do
+ if ! echo "$img" | grep -q 'alt='; then
+ echo -e "${RED}❌ A11y Issue: Image missing alt attribute${NC}" >&2
+ ((ISSUES++))
+ fi
+ done <<< "$IMG_TAGS"
+fi
+
+# Check for form elements
+if grep -qE '<(input|select|textarea)' "$FILE_PATH"; then
+ # Check for labels
+ check_missing "label" "input\|select\|textarea" "Form elements should have associated labels"
+
+ # Check for aria-required on required fields
+ if grep -q 'required' "$FILE_PATH"; then
+ check_missing "aria-required" "required" "Required fields should have aria-required attribute"
+ fi
+
+ # Check for error messages
+ if grep -q 'error' "$FILE_PATH"; then
+ check_missing "aria-describedby\|aria-errormessage" "error" "Error messages should be associated with form fields"
+ fi
+fi
+
+# Check for ARIA attributes
+if grep -q '