ruby-ui / ruby-ui/ruby_ui

`aria-*` boolean attributes serialize as the empty string

未关闭
#538 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
Ruby
星标
1k
派生
67
平均合并
3 天 12 小时
30 天内合并 PR
14

描述

  • Where: every aria: {hidden: true}, aria_disabled: true,
    aria_expanded: true in 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 of true (a bare
    attribute), so it is library-wide, not one component.
  • Fix: pass "true" (a String) for aria-* attributes, or add a
    serialization rule in Base that stringifies booleans under the aria
    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 is aria-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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 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

把新 issue 发到你的邮箱

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