ruby-ui / ruby-ui/ruby_ui

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

Đang mở
#538 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

bug
Ngôn ngữ chính
Ruby
Star
1k
Fork
67
Merge trung bình
3 ngày 12 giờ
Pull request đã merge (30 ngày)
14

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Đọc design/v2/follow-up-issues.md và kiểm tra đường dẫn tuần tự hóa của Base cho các thuộc tính aria trên dòng 2.0. Chạy golden HTML suite và xem xét các snapshot bị ảnh hưởng của catalog và component, bao gồm các dấu phân cách breadcrumb, ellipsis, CommandInput và các SVG trang trí. Công việc được hoàn tất khi các boolean aria được render thành "true" hoặc "false" theo quyết định, các snapshot 2.0 đã được ghi lại và diff của chúng đã được xem xét.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
ruby
Lĩnh vực
accessibility
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.