Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

☂️ eslint-plugin-jsx-a11y #1141

Open
Tracked by #20279
Boshen opened this issue Nov 4, 2023 · 14 comments
Open
Tracked by #20279

☂️ eslint-plugin-jsx-a11y #1141

Boshen opened this issue Nov 4, 2023 · 14 comments
Labels
A-linter Area - Linter good first issue Experience Level - Good for newcomers

Comments

@Boshen
Copy link
Member

Boshen commented Nov 4, 2023

Warning

This comment is maintained by CI. Do not edit this comment directly.
To update comment template, see https://github.com/oxc-project/oxc/tree/main/tasks/lint_rules

This is tracking issue for eslint-plugin-jsx-a11y.

There are 36(+ 3 deprecated) rules.

  • 7/31 recommended rules are remaining as TODO
  • 1/5 not recommended rules are remaining as TODO

To get started, run the following command:

just new-jsx-a11y-rule <RULE_NAME>

Then register the rule in crates/oxc_linter/src/rules.rs and also declare_all_lint_rules at the bottom.

Recommended rules

✨: 24, 🚫: 0 / total: 31
Status Name Docs
jsx-a11y/alt-text https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/alt-text.md
jsx-a11y/anchor-has-content https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-has-content.md
jsx-a11y/anchor-is-valid https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-is-valid.md
jsx-a11y/aria-activedescendant-has-tabindex https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-activedescendant-has-tabindex.md
jsx-a11y/aria-props https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-props.md
jsx-a11y/aria-proptypes https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-proptypes.md
jsx-a11y/aria-role https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-role.md
jsx-a11y/aria-unsupported-elements https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/aria-unsupported-elements.md
jsx-a11y/autocomplete-valid https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/autocomplete-valid.md
jsx-a11y/click-events-have-key-events https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/click-events-have-key-events.md
jsx-a11y/heading-has-content https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/heading-has-content.md
jsx-a11y/html-has-lang https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/html-has-lang.md
jsx-a11y/iframe-has-title https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/iframe-has-title.md
jsx-a11y/img-redundant-alt https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/img-redundant-alt.md
jsx-a11y/interactive-supports-focus https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/interactive-supports-focus.md
jsx-a11y/label-has-associated-control https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/label-has-associated-control.md
jsx-a11y/media-has-caption https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/media-has-caption.md
jsx-a11y/mouse-events-have-key-events https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/mouse-events-have-key-events.md
jsx-a11y/no-access-key https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-access-key.md
jsx-a11y/no-autofocus https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-autofocus.md
jsx-a11y/no-distracting-elements https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-distracting-elements.md
jsx-a11y/no-interactive-element-to-noninteractive-role https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-interactive-element-to-noninteractive-role.md
jsx-a11y/no-noninteractive-element-interactions https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-interactions.md
jsx-a11y/no-noninteractive-element-to-interactive-role https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-element-to-interactive-role.md
jsx-a11y/no-noninteractive-tabindex https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-noninteractive-tabindex.md
jsx-a11y/no-redundant-roles https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-redundant-roles.md
jsx-a11y/no-static-element-interactions https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-static-element-interactions.md
jsx-a11y/role-has-required-aria-props https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-has-required-aria-props.md
jsx-a11y/role-supports-aria-props https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/role-supports-aria-props.md
jsx-a11y/scope https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/scope.md
jsx-a11y/tabindex-no-positive https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/tabindex-no-positive.md

✨ = Implemented, 🚫 = No need to implement

Not recommended rules

✨: 4, 🚫: 0 / total: 5
Status Name Docs
jsx-a11y/anchor-ambiguous-text https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/anchor-ambiguous-text.md
jsx-a11y/control-has-associated-label https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/control-has-associated-label.md
jsx-a11y/lang https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/lang.md
jsx-a11y/no-aria-hidden-on-focusable https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-aria-hidden-on-focusable.md
jsx-a11y/prefer-tag-over-role https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/prefer-tag-over-role.md

✨ = Implemented, 🚫 = No need to implement

Deprecated rules

✨: 0, 🚫: 0 / total: 3
Status Name Docs
jsx-a11y/accessible-emoji https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/accessible-emoji.md
jsx-a11y/label-has-for https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/label-has-for.md
jsx-a11y/no-onchange https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/tree/HEAD/docs/rules/no-onchange.md

✨ = Implemented, 🚫 = No need to implement

@Boshen Boshen changed the title https://github.com/jsx-eslint/eslint-plugin-jsx-a11y (recommended) ☂️ linter: eslint-plugin-jsx-a11y recommended rules (recommended) Nov 4, 2023
@Boshen Boshen changed the title ☂️ linter: eslint-plugin-jsx-a11y recommended rules (recommended) ☂️ linter: eslint-plugin-jsx-a11y recommended rules Nov 4, 2023
@Boshen Boshen added A-linter Area - Linter good first issue Experience Level - Good for newcomers labels Nov 4, 2023
@Boshen
Copy link
Member Author

Boshen commented Nov 4, 2023

cc @manzt

@manzt

This comment was marked as resolved.

@msdlisper
Copy link
Contributor

@Boshen @manzt Can you assign me the task of anchor-has-content?

@manzt
Copy link
Contributor

manzt commented Nov 18, 2023

Feel free to make a PR and reference this issue!

Boshen pushed a commit that referenced this issue Nov 19, 2023
It's my first time trying to implement the rule of linter.
**html-has-lang** for #1141
camc314 pushed a commit that referenced this issue Nov 23, 2023
Boshen pushed a commit that referenced this issue Dec 8, 2023
@JustFly1984
Copy link

This plugin is a great, though nobody maintains eslint plugin for a long time.

Boshen pushed a commit that referenced this issue Dec 16, 2023
When we developed linter for #1141 , we needed to configure some
settings for `jsx-a11y`, which was not supported before, but I am trying
to support it now.
like this:
```
fn config() -> serde_json::Value {
    serde_json::json!([2,{
        "ignoreNonDOM": true
    }])
}

fn settings() -> serde_json::Value {
    serde_json::json!({
        "jsx-a11y": {
            "components": {
                "Button": "button",
            }
        }
    })
}

let pass = vec![
    ("<Button />", Some(config()), Some(settings())),
];
```
@keita-hino
Copy link
Contributor

I will start working on the task of aria-activedescendant-has-tabindex.

@regexyl
Copy link

regexyl commented Jan 16, 2024

Dunqing pushed a commit that referenced this issue Jan 20, 2024
camc314 pushed a commit that referenced this issue Jan 21, 2024
Enables the case where `settings` is used.

Part of  #1141
@Boshen Boshen changed the title ☂️ linter: eslint-plugin-jsx-a11y recommended rules ☂️ eslint-plugin-jsx-a11y Jan 26, 2024
IWANABETHATGUY pushed a commit to IWANABETHATGUY/oxc that referenced this issue May 29, 2024
IWANABETHATGUY pushed a commit to IWANABETHATGUY/oxc that referenced this issue May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter good first issue Experience Level - Good for newcomers
Projects
None yet
Development

No branches or pull requests

8 participants