cursorrules / rules
ivangrynenko/cursorrules/.cursor/rules/accessibility-standards.mdc
WCAG compliance and accessibility best practices
Cursor rule88 starsChanged 11 months ago
What's in it
- Accessibility Standards
- Rule Details
- Filters
- Enforcement Checks
- Suggestions
- Metadata
--- description: WCAG compliance and accessibility best practices globs: *.vue, *.jsx, *.tsx, *.html, *.php --- # Accessibility Standards Ensures WCAG compliance and accessibility best practices. ## Rule Details - **Name:** accessibility_standards - **Description:** Enforce accessibility standards and WCAG compliance ## Filters - file extension pattern: `"\\.(vue|jsx|tsx|html|php|css|scss|sass)$" # Expanded to include CSS files` ## Enforcement Checks - Conditions: - pattern `<img[^>]+(?!alt=)[^>]*>` – Images must have alt attributes for screen readers. - pattern `aria-[a-z]+=\"\"` – ARIA attributes should not be empty; provide meaningful values. - pattern `<button[^>]*>(?![^<]*[^\\s])[^<]*</button>` – Buttons should have meaningful, descriptive content. - pattern `<a[^>]*href=\"#[^\"]*\"[^>]*>(?![^<]*<svg)[^<]*</a>` – Links with href='#' should either be removed or have an aria-label for context. - pattern `<input[^>]+type=\"(text|email|password|search|tel|url)\"[^>]*>` – negated `aria-label|aria-labelledby|title` – Form inputs should include an aria-label or aria-labelledby attribute for better screen reader support. - pattern `<video[^>]*>(?!<track)[^<]*</video>` – Videos should include captions for accessibility. ## Suggestions - Guidance: **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 <nav>, <article>, <section>, and <aside> for better structure comprehension. - **Color Contrast:** Check color contrast ratios meet WCAG guidelines (4.5:1 for normal text, 7:1 for large text). - **Skip Navigation Links:** Provide 'skip to main content' links for keyboard users to bypass repetitive navigation. - **Focus Management:** Ensure focus indicators are visible and manage focus for modal dialogs or dynamic content changes. - **Form Labels:** Associate labels with form controls using the 'for' attribute or wrap controls with <label>. - **Descriptive Links:** Use descriptive text for links, avoiding generic phrases like "click here." - **Touch Targets:** Ensure touch target sizes are large enough (at least 44x44 pixels) for mobile users. - **Timeouts:** Avoid or provide options to extend time limits where possible, or warn users before session expiry. - **Language Attribute:** Set the lang attribute on the <html> element to indicate the primary language of the page. ## Metadata - Priority: high - Version: 1.2
More agent context in ivangrynenko/cursorrules
70 other files this repository gives its agents, the first 60 shown.
AGENTS.md
CLAUDE.md
Cursor rule
- .cursor/rules/api-standards.mdc
- .cursor/rules/behat-ai-guide.mdc
- .cursor/rules/behat-steps.mdc
- .cursor/rules/build-optimization.mdc
- .cursor/rules/code-generation-standards.mdc
- .cursor/rules/confluence-editing-standards.mdc
- .cursor/rules/cursor-rules.mdc
- .cursor/rules/debugging-standards.mdc
- .cursor/rules/docker-compose-standards.mdc
- .cursor/rules/drupal-authentication-failures.mdc
- .cursor/rules/drupal-broken-access-control.mdc
- .cursor/rules/drupal-cryptographic-failures.mdc
- .cursor/rules/drupal-database-standards.mdc
- .cursor/rules/drupal-file-permissions.mdc
- .cursor/rules/drupal-injection.mdc
- .cursor/rules/drupal-insecure-design.mdc
- .cursor/rules/drupal-integrity-failures.mdc
- .cursor/rules/drupal-logging-failures.mdc
- .cursor/rules/drupal-security-misconfiguration.mdc
- .cursor/rules/drupal-ssrf.mdc
- .cursor/rules/drupal-vulnerable-components.mdc
- .cursor/rules/generic_bash_style.mdc
- .cursor/rules/git-commit-standards.mdc
- .cursor/rules/github-actions-standards.mdc
- .cursor/rules/improve-cursorrules-efficiency.mdc
- .cursor/rules/javascript-broken-access-control.mdc
- .cursor/rules/javascript-cryptographic-failures.mdc
- .cursor/rules/javascript-identification-authentication-failures.mdc
- .cursor/rules/javascript-injection.mdc
- .cursor/rules/javascript-insecure-design.mdc
- .cursor/rules/javascript-performance.mdc
- .cursor/rules/javascript-security-logging-monitoring-failures.mdc
- .cursor/rules/javascript-security-misconfiguration.mdc
- .cursor/rules/javascript-server-side-request-forgery.mdc
- .cursor/rules/javascript-software-data-integrity-failures.mdc
- .cursor/rules/javascript-standards.mdc
- .cursor/rules/javascript-vulnerable-outdated-components.mdc
- .cursor/rules/lagoon-docker-compose-standards.mdc
- .cursor/rules/lagoon-yml-standards.mdc
- .cursor/rules/multi-agent-coordination.mdc
- .cursor/rules/new-pull-request.mdc
- .cursor/rules/node-dependencies.mdc
- .cursor/rules/php-drupal-best-practices.mdc
- .cursor/rules/php-drupal-development-standards.mdc
- .cursor/rules/php-memory-optimisation.mdc
- .cursor/rules/project-definition-template.mdc
- .cursor/rules/pull-request-changelist-instructions.mdc
- .cursor/rules/python-authentication-failures.mdc
- .cursor/rules/python-broken-access-control.mdc
- .cursor/rules/python-cryptographic-failures.mdc
- .cursor/rules/python-injection.mdc
- .cursor/rules/python-insecure-design.mdc
- .cursor/rules/python-integrity-failures.mdc
- .cursor/rules/python-logging-monitoring-failures.mdc
- .cursor/rules/python-security-misconfiguration.mdc
- .cursor/rules/python-ssrf.mdc
- .cursor/rules/python-vulnerable-outdated-components.mdc
- .cursor/rules/react-patterns.mdc
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

