npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-plugin-antd-a11y

v0.10.0

Published

ESLint rules and config for accessibility issues in Ant Design apps; the same checks the antd A11y Guard GitHub Action runs

Readme

eslint-plugin-antd-a11y

Accessibility checks for Ant Design apps: the antd-specific problems eslint-plugin-jsx-a11y can't see because it only understands plain JSX elements, plus a tuned jsx-a11y layer. It's the engine behind the antd A11y Guard GitHub Action, so running it locally gives the same result as the PR check.

npm install --save-dev eslint-plugin-antd-a11y

Same check as the GitHub Action

// eslint.config.js
import antdA11y from 'eslint-plugin-antd-a11y';
import tseslint from 'typescript-eslint';

export default [
  ...tseslint.configs.recommended, // provides the parser for .ts/.tsx
  ...antdA11y.config(),
];

antdA11y.config() reads .github/antd-a11y.json, the file the action reads, and applies:

  • rules and options
  • the failOn threshold
  • wrapper aliases
  • jsx-a11y settings
  • the jsx-a11y preset, with the action's tuning and false-positive filters

A processor then does what the action does after linting:

  • drops a jsx-a11y finding on the same element as an antd finding
  • applies a11y-ignore comments
  • reports each finding as an error if it would block the PR check, or a warning if not

eslint exits non-zero exactly when the PR check would fail. A CI test in the action's repo lints its fixture app both ways and checks the results are identical.

Options override the config file:

| Option | Default | | | --- | --- | --- | | configFile | .github/antd-a11y.json | Path relative to cwd; false skips the file | | cwd | process.cwd() | | | failOn | serious | minor, moderate, serious, critical or none | | rules, aliases, settings, jsxA11y | | Same shape as the config file | | files | all JS/TS extensions | | | parser | | Usually set by your TypeScript config instead | | processor | true | false if another processor already handles .jsx/.tsx. Every finding then shows as an error, and a11y-ignore isn't read. |

An invalid config (an unknown rule id, options a rule's schema rejects, a bad alias) throws when ESLint loads it, with the same message the action gives.

This needs flat config (ESLint 9). See the configuration guide for the config file.

The antd rules only

To add just the antd rules to an existing setup:

export default [antdA11y.configs.recommended];
// .eslintrc (legacy)
{ "extends": ["plugin:antd-a11y/recommended-legacy"] }

Rules only report on components they can trace to an antd import. Each rule's meta.docs carries an axe-style impact and the WCAG criteria it covers.

In-house wrappers around antd components are skipped unless you declare them in settings['antd-a11y'].aliases, either for every rule or per rule, with a prop condition that meets the rule:

export default [
  antdA11y.configs.recommended,
  {
    settings: {
      'antd-a11y': {
        aliases: {
          TextField: 'Input',
          HintTooltip: { as: 'Tooltip', satisfies: { 'popup-trigger-focusable': 'asButton' } },
        },
      },
    },
  },
];

With antdA11y.config(), put aliases in the config file instead. See Wrapper components for name, props, satisfies, only and except.

See the rule list and docs.

Not affiliated with or endorsed by Ant Group or the Ant Design team.