ruby-ui / ruby-ui/ruby_ui

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

Open
#538 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
1k
Forks
67
Avg merge
3d 12h
Merged PRs (30d)
14

Description

  • 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read design/v2/follow-up-issues.md and inspect the Base serialization path for aria attributes on the 2.0 line. Run the golden HTML suite and review the affected catalog and component snapshots, including breadcrumb separators, ellipsis, CommandInput, and decorative SVGs. Done means aria booleans render as "true" or "false" as decided, with the 2.0 snapshots re-recorded and their diff reviewed.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
accessibility
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.