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.

  • 8/31 recommended rules are remaining as TODO
  • 2/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

✨: 23, 🚫: 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, 🚫 = Not supported

Not recommended rules

✨: 3, 🚫: 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, 🚫 = Not supported

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, 🚫 = Not supported

@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())),
];
```
@Shinyaigeek
Copy link
Contributor

Shinyaigeek commented Dec 28, 2023

What do you want to benefit from it? Are biome_aria slow?

biome_aria looks totally different from aria-query. aria-query has the data not only about aria but also about DOM elements, but biome_aria does not. I interpret that biome_aria is made to aggregate just the aria related data for biome (maybe specieally for biome’s linter), and is not alternative of aria-query, so it’s API is different.

Considering that oxc will provide an interface for linter plugins defined in userland in the future, I believe that it is advantageous from the viewpoint of easy transition and ecosystem development to provide not only aria data but also dom elements and other data for such users, and to provide an API equivalent to aria-query (but just in my opinion).

@XantreDev
Copy link
Contributor

camc314 pushed a commit that referenced this issue Dec 29, 2023
@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
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