Skip to content

Problem with using v14 for keyboard behaviour to replicate pressing tab in the browser #1018

@kksy

Description

@kksy

Reproduction example

https://codesandbox.io/s/ecstatic-rubin-yygg77?file=/src/App.spec.js

Prerequisites

  1. Go to the codesandbox link and press the "Test" tab

Expected behavior

Button element should have focus. This works when using version 13.5.0 userEvent.tab()

Actual behavior

Button does not have focus or is not the active element in the page

User-event version

14.4.1

Environment

Testing Library framework: @testing-library/[email protected]

JS framework: [email protected]

Test environment: jest sandbox version

DOM implementation: jsdom sandbox version

Additional context

I believe that this missing feature prevents us from testing keyboard accessibility in an easy way

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions