Comfy-Org / Comfy-Org/ComfyUI_frontend
a11y: Make ariaLabel required (or add decorative path) in ChartBar and ChartLine components
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
## Summary
The `ChartBar.vue` and `ChartLine.vue` components expose their `` elements to assistive technology via `role="img"`, but `ariaLabel` is currently optional. This means callers can render unnamed graphics, which fails WCAG 1.1.1 (Non-text Content).
## Proposed Fix
Either:
1. Make `ariaLabel` a **required** prop in both components, or
2. Add an explicit `decorative` (or `ariaHidden`) boolean prop — when `true`, render `aria-hidden="true"` instead of `role="img"`/`aria-label`.
Apply the same fix to both `ChartBar.vue` and `ChartLine.vue`.
## References
- Introduced in PR #9744
- Review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9744#discussion_r2924517962
- Requested by @christian-byrne
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-9803-a11y-Make-ariaLabel-required-or-add-decorative-path-in-ChartBar-and-ChartLine-compo-3216d73d36508171b22cf6a099b3cb8d) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.