-
-
Notifications
You must be signed in to change notification settings - Fork 668
Open
Labels
Description
Bug Description
Current Behaviour
- Legend elements always use default aria-label values regardless of the description property being set.
- Custom accessibility labels, set with the description property are ignored.
- Localisation of legend text is not possible.
Expected Behavior
- The description property should properly override default aria-label values.
https://vega.github.io/vega-lite/docs/legend.html#properties
Impact
- Accessibility: Users relying on screen readers cannot understand chart legends in their language
- Localisation: Cannot provide localised aria-labels international users
Reproduction Steps
- Create a chart with a legend
- Set the description property on the legend configuration
- Inspect the legend elements on your browser
- You will see that the default values are used instead of the custom description
{
"$schema": "https://vega.github.io/schema/vega-lite/v6.json",
"data": {"url": "data/barley.json"},
"mark": "bar",
"encoding": {
"x": {"aggregate": "sum", "field": "yield"},
"y": {"field": "variety"},
"color": {
"field": "site",
"legend": {
"description": "test custom label",
}
}
}
}

priceha