Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

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

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
ruby
领域
accessibility

调研方向

阅读 design/v2/follow-up-issues.md,并检查 2.0 版本中 aria 属性的 Base 序列化路径。运行 golden HTML suite,并检查受影响的目录和组件快照,包括 breadcrumb 分隔符、省略号、CommandInput 和装饰性 SVG。完成的标准是:aria 布尔值按决定渲染为 "true" 或 "false",2.0 快照已重新记录,并且其 diff 已经过审查。

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

描述

bug
  • Where: the components that pass a boolean under the aria hash:
    aria: {hidden: true} in BreadcrumbSeparator, BreadcrumbEllipsis and
    PaginationEllipsis (also reached through DataTablePagination),
    aria: {disabled: true} in BreadcrumbPage, aria_expanded: true in
    CommandInput. The breadcrumb, pagination, data_table and command
    snapshots carry aria-hidden="", aria-disabled="" or aria-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
    true under a nested hash (a bare attribute), so any component that passes
    a boolean there is affected — five today.
  • 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.

主要语言
Ruby
星标
1k
派生
67
平均合并
2 天 19 小时
30 天内合并 PR
18

贡献指南

打开贡献指南

从这里开始

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

ruby-ui/ruby_ui 的其他 Issue

查看 ruby-ui/ruby_ui 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

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