Skip to content
masterclass Buddy

React Testing Library · Method

userEvent.tab

userEvent.tab() simulates a user pressing Tab and moving focus through controls in the DOM. Use it with a user instance created by userEvent.setup() and await the action.

Last updated

Syntax

await user.tab()

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • userEvent.setup
  • fireEvent
  • getByRole
  • findByRole
  • queryByRole

Source: Introduction | Testing Library. Checked 2026-11-03.