Skip to content

Set the sequential focus navigation starting point without location.replace #16982

Description

@Nic-Polumeyv

reset_focus sets the sequential focus navigation starting point with location.replace('#id') (client.js:3792 at 2eed638), then undoes the side effects: the popstate it fires, the nulled history.state, and the scroll. It still leaks a hashchange to app listeners.

Giving the target tabindex="-1", calling focus({ preventScroll: true, focusVisible: false }) and removing the attribute sets the starting point in all three engines with none of those side effects. It was option 1 in #10856, passed over for the focus ring, which focusVisible now removes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions