Skip to content

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

Closed
@makotot

Description

@makotot

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="イメージ" />

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions