ruby-ui / ruby-ui/ruby_ui

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

Aperta
#538 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
Ruby
Stelle
1k
Fork
67
Merge medio
3g 12h
PR unite (30g)
14

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Leggi design/v2/follow-up-issues.md e ispeziona il percorso di serializzazione di Base per gli attributi aria nella linea 2.0. Esegui la golden HTML suite e rivedi gli snapshot interessati del catalogo e dei componenti, inclusi i separatori breadcrumb, i puntini di sospensione, CommandInput e gli SVG decorativi. Il lavoro è completato quando i booleani aria vengono renderizzati come "true" o "false", come deciso, gli snapshot 2.0 sono stati registrati nuovamente e il loro diff è stato esaminato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ruby
Ambito
accessibility
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.