`aria-*` boolean attributes serialize as the empty string
未关闭
还没有人认领这个 Issue。
bug
- 主要语言
- Ruby
- 星标
- 1k
- 派生
- 67
- 平均合并
- 3 天 12 小时
- 30 天内合并 PR
- 14
描述
- Where: every
aria: {hidden: true},aria_disabled: true,
aria_expanded: truein the catalog — breadcrumb separators and ellipsis,
CommandInput, and every decorative<svg aria-hidden>. Snapshots carry
aria-hidden="",aria-disabled="",aria-expanded="". - Effect: the ARIA value grammar accepts
true/false/undefined; an
empty string is invalid and browsers resolve it as not set. Decorative
icons are therefore exposed to assistive technology, "current" breadcrumb
items are not announced as disabled, and the command input's expanded
state is unset. This is Phlex's serialization oftrue(a bare
attribute), so it is library-wide, not one component. - Fix: pass
"true"(a String) foraria-*attributes, or add a
serialization rule inBasethat stringifies booleans under thearia
key; re-record (on the 2.0 line) everything that changes and review the diff. - 2.0 note: spec §4.3 currently preserves this behaviour for parity
(true→""). The right 2.0 behaviour isaria-x="true"; decide it
explicitly and let the re-record (on the 2.0 line) show the blast radius.
Surfaced by the golden HTML suite (PR #536), which pins what 1.6 renders today — this defect included. Per maintainer decision (2026-09-19) main stays as is: this is addressed on the 2.0 line, and the golden snapshot that pins it is re-recorded there with the diff reviewed.
Source: design/v2/follow-up-issues.md.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
阅读 design/v2/follow-up-issues.md,并检查 2.0 版本中 aria 属性的 Base 序列化路径。运行 golden HTML suite,并检查受影响的目录和组件快照,包括 breadcrumb 分隔符、省略号、CommandInput 和装饰性 SVG。完成的标准是:aria 布尔值按决定渲染为 "true" 或 "false",2.0 快照已重新记录,并且其 diff 已经过审查。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- ruby
- 领域
- accessibility
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100