@testing-library/user-event version: 13.5.0
- Testing Framework and version:
jest - v27.4.7, @testing-library/jest-dom - v5.16.1,
- DOM Environment:
jsdom - v19.0.0
Relevant code or config
it('radio and keyboard navigation', async () => {
render(
<>
<input name="test" aria-label="1" type="radio" />
<input name="test" aria-label="2" type="radio" />
</>
);
userEvent.tab();
// Here we're fine
expect(screen.getByLabelText('1')).toHaveFocus();
userEvent.keyboard('{arrowdown}');
// Here we're not
expect(screen.getByLabelText('2')).toHaveFocus();
});
What you did:
Trigger keyboard navigation on input type radio.
What happened:
- Focus is not changing accordingly.
onchange event is not triggered as well.
@testing-library/user-eventversion: 13.5.0jest-v27.4.7,@testing-library/jest-dom-v5.16.1,jsdom-v19.0.0Relevant code or config
What you did:
Trigger keyboard navigation on input type radio.
What happened:
onchangeevent is not triggered as well.