github / github/annotation-toolkit

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

未关闭
#32 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
backlog improvement set:form-element
主要语言
没有语言数据
星标
320
派生
33
平均合并
36 分钟
30 天内合并 PR
2

描述

### 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/)

贡献指南

打开贡献指南

调研方向

从表单元素注释入口开始,检查禁用切换开关的表示方式,然后将其与现有的 Primer A11y Presets flyout 行为进行比较。当启用切换开关后,注释中能够传达 aria-disabled 的建议及其理由,并且最终的呈现方式已达成一致并完成验证时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
figma
领域
accessibility, design
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。