github / github/auto-complete-element

Add client-side options support

未关闭
#52 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
407
派生
57
平均合并
1 天 7 小时
30 天内合并 PR
5

描述

# Problem
If there are static options passed into the element, the options are deleted on request for filtered options.

# Request
Client-side options should be supported and have filtering available. TBD: Do we allow both client-side (such as default options) *and* server-side options?

# Implementation concerns
## Accessibility
Ensure that any default / client-side options are announced when the input is focused. `screen-reader-announcements.ts` can assist with this.

When the options list isn't visible, an `aria-describedby` should be added to the input pointing to the feedback element. This should only be if the element has client-side options. Remove this `aria-describedby` when the user interacts with any key, and add it back in when the auto-complete-element is blurred. cc @github/accessibility and @jscholes for reference. "aria-live won't cut it" for this scenario

## Developer Notes
There is some initial setup done in `autocomplete.ts` to detect client-side options, but all of this can be removed / reworked, as long as accessibility considerations are met.

贡献指南

打开贡献指南

调研方向

从 autocomplete.ts 开始,检查现有的客户端选项检测,然后阅读 screen-reader-announcements.ts 了解无障碍行为。跟踪在经过筛选的请求期间如何移除选项,并定义客户端选项与服务端选项之间受支持的交互。完成的标准是客户端选项仍然可用、筛选功能正常,并且涵盖所描述的焦点、键盘、blur 和 aria-describedby 行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
accessibility, frontend, web-dev
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

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