diff --git a/.cursor/rules/accessibility-standards.mdc b/.cursor/rules/accessibility-standards.mdc index 7729123..22885e4 100644 --- a/.cursor/rules/accessibility-standards.mdc +++ b/.cursor/rules/accessibility-standards.mdc @@ -6,51 +6,39 @@ globs: *.vue, *.jsx, *.tsx, *.html, *.php Ensures WCAG compliance and accessibility best practices. - -name: accessibility_standards -description: Enforce accessibility standards and WCAG compliance -filters: - - type: file_extension - pattern: "\\.(vue|jsx|tsx|html|php|css|scss|sass)$" # Expanded to include CSS files - -actions: - - type: enforce - conditions: - - pattern: "]+(?!alt=)[^>]*>" - message: "Images must have alt attributes for screen readers." - - - pattern: "aria-[a-z]+=\"\"" - message: "ARIA attributes should not be empty; provide meaningful values." - - - pattern: "]*>(?![^<]*[^\\s])[^<]*" - message: "Buttons should have meaningful, descriptive content." - - - pattern: "]*href=\"#[^\"]*\"[^>]*>(?![^<]*" - message: "Links with href='#' should either be removed or have an aria-label for context." - - - pattern: "]+type=\"(text|email|password|search|tel|url)\"[^>]*>" - pattern_negate: "aria-label|aria-labelledby|title" - message: "Form inputs should include an aria-label or aria-labelledby attribute for better screen reader support." - - - pattern: "]*>(?!" - message: "Videos should include captions for accessibility." - - - type: suggest - message: | - **Accessibility Best Practices:** - - **Heading Hierarchy:** Use headings (h1 to h6) in a logical order to structure content. - - **Keyboard Navigation:** Ensure all interactive elements are accessible via keyboard. - - **Semantic HTML:** Favor semantic elements like