Skip to content

Accessibility: Focus is lost when using ESC for Dropdown Component (Screenreader / Keyboard navigation) #1080

@mandrasch

Description

@mandrasch

First of all: Thanks very much for providing this awesome library as open source! 💚

I'm currently testing integrations of an existing site regarding WCAG 2.2 AA conformance.

I noticed the following challenge for screenreader users:

The focus is lost after using ESC to get out of a dropdown dialog.

Reproduction:

  1. Activate VoiceOver (CMD + F5)
  2. Visit https://floating-vue.starpad.dev/guide/component#dropdown in Safari
  3. Use TAB to get to dropdown button
  4. Click ENTER, text is read out by VoiceOver
  5. Click ESC to dismiss the dropdown dialogue
  6. Use TAB again --> Focus is on beginning of page

Expected State:

Active focus is on the element, which triggered the dropdown (dropdown button "click me")

Tested with: Safari 18.5, VoiceOver, OSX 15.5

This can be debugged in Chrome as well with TAB (no screenreader):

Tab to Button ✅

Image

Hit ENTER ✅

Image

After hitting ESC - focus is set to , not back to clicked button ❌

Image

Thanks very much in advance!

PS: Also opened a question here for tooltip component in regards to accessibility #1079

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions