Akryum / Akryum/floating-vue

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

未关闭
#1,080 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
3.5k
派生
341
平均合并
14 分钟
30 天内合并 PR
8

描述

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](https://github.com/user-attachments/assets/cb8937f8-ffc7-4933-98f9-7a9ca229a1b8)

Hit ENTER ✅

![Image](https://github.com/user-attachments/assets/0852afc2-c2b0-4114-a45b-ea066868c0d4)

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

![Image](https://github.com/user-attachments/assets/fc37d7d6-114a-467b-a861-f6931ed4ec86)

Thanks very much in advance!

PS: Also opened a question here for tooltip component in regards to accessibility https://github.com/Akryum/floating-vue/discussions/1079

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。