Skip to content

aria-* boolean attributes serialize as the empty string #538

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions