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

オープン
#538 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
ruby
領域
accessibility

調査の方向性

design/v2/follow-up-issues.md を読み、2.0 系列の aria 属性に関する Base のシリアライゼーションパスを調査してください。golden HTML suite を実行し、影響を受けるカタログとコンポーネントのスナップショットを確認してください。breadcrumb の区切り、ellipsis、CommandInput、装飾的な SVGs も対象に含めます。完了条件は、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時間
マージ済み PR(30日)
18

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ruby-ui/ruby_ui のほかの issue

ruby-ui/ruby_ui の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。