github / github/annotation-toolkit

[Feature request] Add `aria-disabled` guidance to form element annotations

Đang mở
#32 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
backlog improvement set:form-element
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
320
Fork
33
Merge trung bình
36 phút
Pull request đã merge (30 ngày)
2

Mô tả

### Description

When annotating form elements that should be non-interactive, the toolkit currently offers a `disabled` toggle. In practice, using the native `disabled` attribute removes the element from the accessibility tree, making it undiscoverable to assistive technology users. The preferred approach in most cases is to use `aria-disabled="true"` instead, which keeps the element discoverable while preventing interaction.

### Requested change

When the disabled state is toggled on for a form element annotation, the annotation should communicate that `aria-disabled` is the recommended approach. This could look like:

- Replacing the simple "disabled: true" label with guidance text, such as: "This field should use `aria-disabled` to maintain accessibility and discoverability"
- Adding a flyout tip (similar to how Primer A11y Presets work) that appears when the toggle is enabled, explaining the rationale

### Why

Using `aria-disabled` instead of `disabled` is a widely recommended practice. By surfacing this guidance directly in the annotation, we can help designers communicate the right implementation to developers without requiring specialized accessibility knowledge.

### References

- [Make disabled buttons accessible](https://advancedbytez.com/make-disabled-buttons-accessible/)

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

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

Đánh giá

Issue này chưa được đánh giá.

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.