FilteredActionList: filter input references a missing list while loading or showing a message

已关闭 适合新手
#8,633 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #8634 来自 @HadrielWonda —— 已合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
cypress, react, storybook, typescript

调研方向

从FilteredActionList开始,检查在渲染bodySpinner、bodySkeleton或一条消息时,筛选输入框如何设置aria-expanded和aria-controls。检查 issue 中列出的加载和无结果 Storybook stories,包括SelectPanel的用法。当输入框的 ARIA 属性与其控制的列表是否存在相匹配,并且 axe 在这些状态下不报告aria-valid-attr-value错误时,即为完成。

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

描述

accessibility bug
Description

The filter input in FilteredActionList always renders aria-expanded="true" and aria-controls={listId}. When the body shows a loader (loadingType bodySpinner or bodySkeleton) or a message (for example, no results), the list with that id is not rendered, so the combobox points at an element that does not exist.

Assistive technology is told a popup is open when no list is rendered, and axe reports aria-valid-attr-value (critical): Invalid ARIA attribute value: aria-controls=":r0:".

SelectPanel renders FilteredActionList, so it can show the same markup in its loading and empty states.

Steps to reproduce
  1. Open any of these Storybook stories:
  2. Inspect the filter input: it has aria-expanded="true" and aria-controls=":r0:".
  3. document.getElementById(':r0:') returns null.
  4. Running axe on the story reports aria-valid-attr-value.
Version

v38.43.0 (current main)

Browser

All (found with axe-core 4.10 in Chromium)

主要语言
TypeScript
星标
3.9k
派生
718
平均合并
3 天 6 小时
30 天内合并 PR
88

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

primer/react 的其他 Issue

查看 primer/react 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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