`aria-*` boolean attributes serialize as the empty string
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- ruby
调研方向
阅读 design/v2/follow-up-issues.md,并检查 2.0 版本中 aria 属性的 Base 序列化路径。运行 golden HTML suite,并检查受影响的目录和组件快照,包括 breadcrumb 分隔符、省略号、CommandInput 和装饰性 SVG。完成的标准是:aria 布尔值按决定渲染为 "true" 或 "false",2.0 快照已重新记录,并且其 diff 已经过审查。
由索引模型根据 Issue 内容生成。
描述
- Where: the components that pass a boolean under the
ariahash:
aria: {hidden: true}inBreadcrumbSeparator,BreadcrumbEllipsisand
PaginationEllipsis(also reached throughDataTablePagination),
aria: {disabled: true}inBreadcrumbPage,aria_expanded: truein
CommandInput. The breadcrumb, pagination, data_table and command
snapshots carryaria-hidden="",aria-disabled=""oraria-expanded="".
Components that pass the String"true"—InputOtpSlot,
NativeSelectIcon,AlertDialogContent— already serialize correctly and
are not affected. - Effect: the ARIA value grammar accepts
true/false/undefined; an
empty string is invalid and browsers resolve it as not set. The breadcrumb
and pagination separators and ellipses 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 of
trueunder a nested hash (a bare attribute), so any component that passes
a boolean there is affected — five today. - 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.
- 主要语言
- Ruby
- 星标
- 1k
- 派生
- 67
- 平均合并
- 2 天 19 小时
- 30 天内合并 PR
- 18
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby-ui/ruby_ui 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
-
bug
难度 2/5 1-3 小时 新手友好度 55/100
-
bug
难度 1/5 1-3 小时 新手友好度 35/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
TheOdinProject/curriculum#31417 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 65/100
glossarist/glossarist-ruby#238 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
palladius/rails8-app-on-gcp#145 ·