Skip to content

improve docs because ByRole does not receive exact anymore #1373

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

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions docs/queries/about.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,10 @@ can contain options that affect the precision of string matching:

- `exact`: Defaults to `true`; matches full strings, case-sensitive. When false,
matches substrings and is not case-sensitive.
- `exact` has no effect on `regex` or `function` arguments.
- `exact` has no effect on accessible names specified with the `name` option
of `*byRole` queries. You can use a regex for fuzzy matching on accessible
names.
- In most cases using a regex instead of a string gives you more control over
fuzzy matching and should be preferred over `{ exact: false }`.
- it has no effect when used together with `regex` or `function` arguments.
- it is not available in `*byRole` queries.
- in most cases, using a regex instead of a string combined with `{ exact: false }`
gives you more control over fuzzy matching so it should be preferred.
- `normalizer`: An optional function which overrides normalization behavior. See
[`Normalization`](#normalization).

Expand Down