not able to add custom attributes to the axis
shivasai09 opened this issue · comments
shivasai09 commented
we now that using axisBottom
or axisRight
or any other axis making function, we get the below HTML,
but my concern is how to add custom attributes to the <line>
or <text>
elements.
I need this to increase the accessibility for our product. if it is possible to add custom attributes to <line>
or <text>
, then i would like to add the aria-*
attributes to it so, that my screen reader will be able to give more descriptive information.
can any one help me how to achieve this.?
Thanks,
Siva
Philippe Rivière commented
You can call a function after applying an axis, see https://observablehq.com/@d3/connected-scatterplot#xAxis for an example.