feat: add menu and route support for axis props#13183
Conversation
| } | ||
| } | ||
|
|
||
| // FIXME: Currently, Vega's `ariaGuide` reads `description` from `item.description` (the child visual item), not from `mark.description` (the group definition). Since `buildAxisEncode` does not map `description`, the value is never populated on the item and the custom description is silently ignored. As a workaround, inject the description via a custom `encode.axis.enter` mapping so that Vega copies it onto the visual item during initialization. |
There was a problem hiding this comment.
I discovered that custom axis descriptions were being silently ignored because Vega’s internal accessibility helper (ariaGuide) reads the description from the child visual item (item.description) rather than the group mark definition (mark.description). Since Vega’s default axis encoder does not map the top-level description down to this child item, the custom value is never populated. To resolve this, this change dynamically injects the description via encode.axis.enter.description as a workaround, ensuring the value is correctly copied to the child visual item during initialization and properly rendered as the SVG group's aria-label in the DOM.
There was a problem hiding this comment.
Also you may notice when description property is set to some value. aria-label attribute is being set to two componets (intended component and it's inner component)
There was a problem hiding this comment.
I wonder if this is a bug on Vega's side. And if so, it may be worth opening an issue on the Vega repo.
There was a problem hiding this comment.
Yup, I'll take another look at this issue and open an issue on the Vega repo.
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
kgryte
left a comment
There was a problem hiding this comment.
Overall, looks good. Added a couple of TODOs which can be addressed once we do a clean-up pass throughout the whole Vega implementation.
|
As the CI failure is expected, I'll go ahead and merge. |
Resolves None
Description
This pull request:
Screen.Recording.2026-06-29.at.1.07.47.AM.mp4
Related Issues
This pull request has the following related issues:
Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This contribution was developed with the assistance of AI (Gemini). AI was used for codebase research, error analysis, and code generation. Specifically:
ariaGuidereads descriptions directly from the child visual item rather than the parent mark definition. The AI helped identify this root cause and generate a workaround to map descriptions viaencode.axis.enter.@stdlib-js/reviewers