Open Krituhar opened 2 months ago
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.92.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
This seems really low priority
This is uses the standard codicon rendering of IStatusbarEntry#text
@jrieken no, this is from rendering a custom hover here:
If I understand this issue correctly, rendering a codicon alone is not sufficient to convey the information to screen reader users and thus needs ARIA labels.
@Krituhar can you clarify how this should be done specifically for this case? There is no SVG element involved, rather the icon is renderer with a :before
:
Wouldn't it help if the entire hover had a custom ARIA label that is being read out that includes the severity per item?
@jrieken no, this is from rendering a custom hover here:
But it used renderLabelWithIcons
, which I assumed you own. Not?
@jrieken no, I do not recall writing any of it, it seems to have come in via https://github.com/microsoft/vscode/pull/105589
But if we can make renderLabelWithIcons
and maybe renderIcon
accessible, we can likely fix it for more cases. I am just not sure how to convert a simple <span>
element with a Codicon to be screen reader accessible without adding to many new elements around it, or without even having access to the parent node. That's why I suggested to fix it in the language status contribution code.
@rperez030 and @jooyoungseo, do you have thoughts here?
On the one hand, if the icon is providing useful info, it would be good to convey that. however, doing so will mean it's more verbose.
[Issue] The "i" icon and "tick" icon that appears when user hover on "Editor Language Status" ({}) control are without textual equivalents.
[User Impact] Screen reader users will not receive an accurate impression of the contents of these images.
[Code Reference]
[Recommendation] Ensure images provide informative alternative text. Textual equivalents must be both concise and descriptive.
To add a textual equivalent to an
<svg>
element, add a<title>
, then add an ID to the<title>
. Finally, on the<svg>
, add anaria-labelledby
attribute and set its value to the ID of the<title>
Provide "info" for the i icon and "selected" or similar for the tick icon.Screenshot of the issue: