Comfy-Org / Comfy-Org/ComfyUI_frontend

a11y: Make ariaLabel required (or add decorative path) in ChartBar.vue and ChartLine.vue

Open
#9,805 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
area:ui
Dominant language
TypeScript
Stars
2k
Forks
704
Avg merge
1d 8h
Merged PRs (30d)
512

Description

## Summary

Both `ChartBar.vue` and `ChartLine.vue` expose a `` element with `role="img"` but declare `ariaLabel` as an optional prop. This allows callers to render an unnamed graphic, which is inaccessible to assistive technologies.

## Proposed fix

- Make `ariaLabel` a **required** prop in both components, **or**
- Add an explicit decorative path: support a boolean `decorative` (or `ariaHidden`) prop that renders `aria-hidden="true"` and omits `role="img"`/`aria-label` when the chart is purely decorative.

## Files

- `src/components/ui/chart/ChartBar.vue`
- `src/components/ui/chart/ChartLine.vue`

## Context

Flagged during code review of PR #9744 by @coderabbitai and confirmed by @christian-byrne as non-blocking / followup.

- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9744
- Comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9744#discussion_r2924517966

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-9805-a11y-Make-ariaLabel-required-or-add-decorative-path-in-ChartBar-vue-and-ChartLine-v-3216d73d36508105bd30e6f375306c12) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.