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

[img-redundant-alt] words option does not work with double-byte character words. #969

Closed
makotot opened this issue Jan 8, 2024 · 0 comments · Fixed by #970
Closed

[img-redundant-alt] words option does not work with double-byte character words. #969

makotot opened this issue Jan 8, 2024 · 0 comments · Fixed by #970

Comments

@makotot
Copy link
Contributor

makotot commented Jan 8, 2024

If a multibyte character is specified in words option, the corresponding character is not treated as an error.
This may be due to the fact that word boundary \b do not support multibyte characters.

For example, in Japanese, "image" can be written as "イメージ". However, specifying this in option words is not treated as an error.

    'jsx-a11y/img-redundant-alt': ['error', {
      words: ['イメージ'],
    }],
      <img src='path/to/image.jpg' alt="イメージ" />
makotot added a commit to makotot/eslint-plugin-jsx-a11y that referenced this issue Jan 8, 2024
ljharb pushed a commit to makotot/eslint-plugin-jsx-a11y that referenced this issue Jan 9, 2024
ljharb pushed a commit to makotot/eslint-plugin-jsx-a11y that referenced this issue Jan 9, 2024
@ljharb ljharb closed this as completed in 2d8d557 Jan 9, 2024
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Aug 21, 2024
##### [v6.9.0](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/CHANGELOG.md#v690---2024-06-19)

##### Fixed

-   \[Fix] `img-redundant-alt`: fixed multibyte character support [`#969`](jsx-eslint/eslint-plugin-jsx-a11y#969)
-   \[meta] fix changelog links [`#960`](jsx-eslint/eslint-plugin-jsx-a11y#960)

##### Commits

-   \[New] add support for Flat Config [`6b5f096`](jsx-eslint/eslint-plugin-jsx-a11y@6b5f096)
-   Revert "\[Fix] `isNonInteractiveElement`: Upgrade aria-query to 5.3.0 and axobject-query to 3.2.1" [`75d5dd7`](jsx-eslint/eslint-plugin-jsx-a11y@75d5dd7)
-   \[Robustness] use `safe-regex-test` [`4c7e781`](jsx-eslint/eslint-plugin-jsx-a11y@4c7e781)
-   \[actions] update actions/checkout [`51a1ca7`](jsx-eslint/eslint-plugin-jsx-a11y@51a1ca7)
-   \[Dev Deps] update `@babel/cli`, `@babel/core`, `@babel/eslint-parser`, `@babel/plugin-transform-flow-strip-types`, `@babel/register`, `eslint-doc-generator`, `object.entries` [`1271ac1`](jsx-eslint/eslint-plugin-jsx-a11y@1271ac1)
-   \[Dev Deps] update `@babel/cli`, `@babel/core`, `@babel/register`, `aud`, `eslint-plugin-import`, `npmignore`, `object.assign` [`540cb7a`](jsx-eslint/eslint-plugin-jsx-a11y@540cb7a)
-   \[Deps] update `@babel/runtime`, `array-includes`, `es-iterator-helpers`, `hasown`, `object.fromentries`, `safe-regex-test` [`5d14408`](jsx-eslint/eslint-plugin-jsx-a11y@5d14408)
-   \[Deps] pin `aria-query` and `axobject-query`, add `ls-engines` test to CI [`32fd82c`](jsx-eslint/eslint-plugin-jsx-a11y@32fd82c)
-   \[Dev Deps] update `@babel/core`, `@babel/eslint-parser`, `@babel/plugin-transform-flow-strip-types`, `eslint-doc-generator` [`d1b4114`](jsx-eslint/eslint-plugin-jsx-a11y@d1b4114)
-   \[Fix] ensure `summary` remains non-interactive [`6a048da`](jsx-eslint/eslint-plugin-jsx-a11y@6a048da)
-   \[Deps] remove `@babel/runtime` [`0a98ad8`](jsx-eslint/eslint-plugin-jsx-a11y@0a98ad8)
-   \[New] `no-noninteractive-element-to-interactive-role`: allow `menuitemradio` and `menuitemcheckbox` on \<li> [`c0733f9`](jsx-eslint/eslint-plugin-jsx-a11y@c0733f9)
-   \[Deps] update `@babel/runtime`, `safe-regex-test` [`0d5321a`](jsx-eslint/eslint-plugin-jsx-a11y@0d5321a)
-   \[actions] pin codecov to v3.1.5 [`961817f`](jsx-eslint/eslint-plugin-jsx-a11y@961817f)
-   \[Deps] unpin `axe-core` [`b3559cf`](jsx-eslint/eslint-plugin-jsx-a11y@b3559cf)
-   \[Deps] move `object.entries` to dev deps [`1be7b70`](jsx-eslint/eslint-plugin-jsx-a11y@1be7b70)
-   \[Deps] update `@babel/runtime` [`2a48abb`](jsx-eslint/eslint-plugin-jsx-a11y@2a48abb)
-   \[Deps] update `@babel/runtime` [`1adec35`](jsx-eslint/eslint-plugin-jsx-a11y@1adec35)
renovate bot added a commit to mmkal/eslint-plugin-mmkal that referenced this issue Aug 21, 2024
##### [v6.9.0](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/HEAD/CHANGELOG.md#v690---2024-06-19)

##### Fixed

-   \[Fix] `img-redundant-alt`: fixed multibyte character support [`#969`](jsx-eslint/eslint-plugin-jsx-a11y#969)
-   \[meta] fix changelog links [`#960`](jsx-eslint/eslint-plugin-jsx-a11y#960)

##### Commits

-   \[New] add support for Flat Config [`6b5f096`](jsx-eslint/eslint-plugin-jsx-a11y@6b5f096)
-   Revert "\[Fix] `isNonInteractiveElement`: Upgrade aria-query to 5.3.0 and axobject-query to 3.2.1" [`75d5dd7`](jsx-eslint/eslint-plugin-jsx-a11y@75d5dd7)
-   \[Robustness] use `safe-regex-test` [`4c7e781`](jsx-eslint/eslint-plugin-jsx-a11y@4c7e781)
-   \[actions] update actions/checkout [`51a1ca7`](jsx-eslint/eslint-plugin-jsx-a11y@51a1ca7)
-   \[Dev Deps] update `@babel/cli`, `@babel/core`, `@babel/eslint-parser`, `@babel/plugin-transform-flow-strip-types`, `@babel/register`, `eslint-doc-generator`, `object.entries` [`1271ac1`](jsx-eslint/eslint-plugin-jsx-a11y@1271ac1)
-   \[Dev Deps] update `@babel/cli`, `@babel/core`, `@babel/register`, `aud`, `eslint-plugin-import`, `npmignore`, `object.assign` [`540cb7a`](jsx-eslint/eslint-plugin-jsx-a11y@540cb7a)
-   \[Deps] update `@babel/runtime`, `array-includes`, `es-iterator-helpers`, `hasown`, `object.fromentries`, `safe-regex-test` [`5d14408`](jsx-eslint/eslint-plugin-jsx-a11y@5d14408)
-   \[Deps] pin `aria-query` and `axobject-query`, add `ls-engines` test to CI [`32fd82c`](jsx-eslint/eslint-plugin-jsx-a11y@32fd82c)
-   \[Dev Deps] update `@babel/core`, `@babel/eslint-parser`, `@babel/plugin-transform-flow-strip-types`, `eslint-doc-generator` [`d1b4114`](jsx-eslint/eslint-plugin-jsx-a11y@d1b4114)
-   \[Fix] ensure `summary` remains non-interactive [`6a048da`](jsx-eslint/eslint-plugin-jsx-a11y@6a048da)
-   \[Deps] remove `@babel/runtime` [`0a98ad8`](jsx-eslint/eslint-plugin-jsx-a11y@0a98ad8)
-   \[New] `no-noninteractive-element-to-interactive-role`: allow `menuitemradio` and `menuitemcheckbox` on \<li> [`c0733f9`](jsx-eslint/eslint-plugin-jsx-a11y@c0733f9)
-   \[Deps] update `@babel/runtime`, `safe-regex-test` [`0d5321a`](jsx-eslint/eslint-plugin-jsx-a11y@0d5321a)
-   \[actions] pin codecov to v3.1.5 [`961817f`](jsx-eslint/eslint-plugin-jsx-a11y@961817f)
-   \[Deps] unpin `axe-core` [`b3559cf`](jsx-eslint/eslint-plugin-jsx-a11y@b3559cf)
-   \[Deps] move `object.entries` to dev deps [`1be7b70`](jsx-eslint/eslint-plugin-jsx-a11y@1be7b70)
-   \[Deps] update `@babel/runtime` [`2a48abb`](jsx-eslint/eslint-plugin-jsx-a11y@2a48abb)
-   \[Deps] update `@babel/runtime` [`1adec35`](jsx-eslint/eslint-plugin-jsx-a11y@1adec35)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants