npm / @testing-library/user-event
@testing-library/user-event
What changed in @testing-library/user-event 14, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
32 breaking8 new APIs and options8 behavior and defaults13 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@testing-library/user-event 1461 changes
Breaking changes 32
Use the > modifier descriptors to indicate that Alt, Control, Meta, or Shift should not be released.
userEvent.upload no longer supports clickInit as part of its init parameter.
Copy, cut, and paste prevent their default behavior.
Use {Control} instead of the legacy {ctrl} descriptor; {Control>} describes holding the key without releasing it.
Keyboard events no longer support the keyCode property.
Keyboard interactions now apply modifier state.
Support for user-provided MouseEventInit has been removed.
Support for Node 10 was removed after it reached end of life.
Pointer-related APIs were replaced, which may affect tests relying on unintended side effects of the previous implementation.
Introduces the pointerEventsCheck option, including PointerEventsCheckLevel.Never as the replacement for skipPointerEvents.
The special key descriptor behavior has been removed.
Removes skipPointerEvents; use pointerEventsCheck: PointerEventsCheckLevel.Never instead.
Tab order now places tabIndex>0 before tabIndex=0.
APIs always return a Promise, so callers need to await or otherwise handle asynchronous interactions.
Calling clear on a non-editable element, or when handlers prevent focus or content selection, now throws an error.
The init parameter has been removed.
Copy and cut now prevent their default browser behavior.
The init parameter has been removed.
The init parameter has been removed.
The init parameter has been removed.
The paste API has new parameters and has been replaced.
The paste API was replaced.
Paste now prevents its default browser behavior.
The init parameter has been removed.
The focusTrap option has been removed.
The init parameter has been removed.
With skipClick=false and no initialSelectionStart, type no longer moves the cursor.
The init parameter has been removed.
Upload behavior now replaces element properties.
applyAccept now defaults to true.
The init parameter has been removed from userEvent.upload.
Tab navigation skips elements with visibility:hidden.
New APIs and options 8
The CommonJS bundle and types are exported.
The bundled ESM build is exported.
Adds [Tab] support to keyboard input.
Adds an API for simulating copy interactions.
Adds an API for simulating cut interactions.
Adds a pointer API.
Adds the setup API for preparing user-event interactions.
Adds an API for simulating a triple click.
Behavior and default changes 8
user.keyboard typing now supports iframes.
Adds support for the beforeinput event.
Select-all behavior is supported through {Control}+[KeyA].
Pointer events now apply modifier keys.
Pointer interactions can change selection.
Selection handling was rewritten.
The clear API was rewritten.
The library keeps track of document state in the UI.
Fixes and other changes 13
Pressing Enter in a single number input now submits the form.
Fixed handling of maxlength on tel inputs.
Fixes tracking the value of inputs and textareas in shadow DOM.
Implicit form submission now matches the browser specification.
Valid numbers in number inputs keep their string value.
Programmatic null input values are treated as empty strings.
DataTransfer format aliases are normalized.
Default pointer event pointerType is now an empty string instead of the string "undefined".
Fixes tab retargeting when focus moves during keydown.
Fixes the repeat property on keyboard events.
Keyboard interactions can move the cursor and delete content in contenteditable.
Disabled-state checks now account for inherited :disabled.
Corrects the order of upload events.