-
Notifications
You must be signed in to change notification settings - Fork 410
Closed
Labels
Description
Describe the feature you'd like:
According to the spec menuitemcheckbox
and menuitemradio
both require aria-checked
attributes.
I think it would be nice to be able to write:
expect(getByRole('menuitemradio', {name: 'Some option'})).toBeChecked();
Suggested implementation:
Add menuitemcheckbox
and menuitemradio
to the allowed roles in the matcher.
Describe alternatives you've considered:
So far, I was only able to use low level matchers like toHaveAttribute('aria-checked', 'true')
.
Teachability, Documentation, Adoption, Migration Strategy:
The roles would need to be added to list of allowed roles mentioned in the readme and the error messages.
Happy to prepare a PR.
nickserv and jerome-diver