Replies: 1 comment
-
Hi @eemt, thanks for the suggestion. We have worked with our internal accessibility team to implement the simplest accessible icons that meet wcag guidelines. Here are the reasons why we are not doing it like your suggestion at this time: The recommended best practice is that the In addition, the original title attribute was complicating the <cds-button> <cds-icon shape="bars"></cds-icon> menu </cds-button> In the case above, the icon needs to be invisible to a screen reader. When cds-icons (a re-write of the original clr-icons) was implemented for
This article digs down into more details and was used as a reference as we iterated on a solution with the accessibility team. |
Beta Was this translation helpful? Give feedback.
-
The documentation under Foundation -> Icons -> Accessibility makes the following recommendation:
I propose that this is not the best solution.
I recommend that instead of using aria-label on the button, it is better to use the title attribute on the icon.
The documented solution addresses the issue of missing text on the button. However, it leaves open the lack of text on the icon. Furthermore, using title on the icon has the advantage that mouse using sighted users will get a tool tip description of the button. This avoids unnecessary use of aria and gets three advantages instead of one.
Beta Was this translation helpful? Give feedback.
All reactions