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
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