feat(microchart-line): improve accessibility - #1781
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves the accessibility of the si-microchart-line component by adding a host role of 'img' and providing descriptive aria-label attributes in the example usage. A review comment suggests refining one of the labels to remove a colon, ensuring compliance with the Siemens UX writing guidelines for concise, telegram-style UI text.
eb6183b to
b3246c8
Compare
b22ba0c to
64e8ac3
Compare
64e8ac3 to
3df98f2
Compare
spliffone
left a comment
There was a problem hiding this comment.
I am uncertain that automatically applying a role without description is the right way I suggest we quickly discuss it in core meeting - so everyone is aligned.
@spike-rabbit WDYT? I agree with rayk that the role should be supported with a meaningful desc. but whether we should make user specify this or should be a required input (breaking change) in our components, is something we should decide |
|
It depends if we expect the micro line chart to have relevant information that needs to accessible or just a visual enhancement, that could be omitted. @panch1739 WDYT? |
@panch1739 Can you share your input? |
spike-rabbit
left a comment
There was a problem hiding this comment.
After discussion: setting the role img would make an aria-label or similar effectively required. While in most cases this the line chart should be probably exposed to a11y technology, there could be cases where this is not needed.
It also pointless to expose the chart, of the label does not provide a value so actually describing what can be seen.
Enforcing it would potentially lead to a lot of useless labels, so we are better of by not enforcing it at all.
@akashsonune instead of enforcing it in the code, we should actually have a comment about this in the docs.
Documentation.
Examples.
Dashboards Demo.
Playwright report.
Coverage Reports: