Skip to content

[Accessibility] Enable and enforce full eslint-plugin-react-native-a11y ruleset #84312

@rushatgabhane

Description

@rushatgabhane

Overview

The eslint-plugin-react-native-a11y plugin is installed and partially configured, but it's not effectively catching accessibility issues. Several rules are disabled or missing, which means a11y problems slip through to production and are only caught later via manual testing or user reports.

Current State

The ESLint config (eslint.config.mjs) uses the basic preset only:

extends: ['plugin:react-native-a11y/basic']

With these overrides:

  • react-native-a11y/has-accessibility-hintoff
  • react-native-a11y/has-valid-accessibility-descriptors → error (custom config for touchables)

Task

  1. Upgrade from basic to all preset in eslint.config.mjs:
    extends: ['plugin:react-native-a11y/all']
  2. Evaluate re-enabling has-accessibility-hint — if too noisy, keep it off but document why.
  3. Fix all new lint violations introduced by enabling the additional rules. This can be done incrementally:
    • Start by enabling rules as warn to assess the scope
    • Then fix violations and promote to error
  4. Verify the rules actually run — confirm ESLint output includes react-native-a11y/* rule hits on known-bad files.

Why This Matters

Multiple open accessibility issues (e.g., #74866, #76928, #74840, #77259) are about missing live regions and status announcements — problems that has-valid-accessibility-live-region and other rules are designed to catch at lint time before they reach production.

Note: Discuss on Slack if you are unsure about the right approach. A phased rollout (warn → error) is fine.

Issue OwnerCurrent Issue Owner: @ShridharGoel

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions