We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd3a066 commit a3c58c6Copy full SHA for a3c58c6
src/shared/components/TopcoderHeader/desktop/SubMenu/Item/index.jsx
@@ -18,6 +18,7 @@ export default function Item({
18
}) {
19
let styleName = 'item';
20
if (currentSubMenuTitle === title) styleName += ' current';
21
+ const accessibleIcon = React.cloneElement(icon, { 'aria-label': `${title}` });
22
return (
23
/* TODO: Should be done in a clean way, witout disabling eslint rules. */
24
/* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */
@@ -29,7 +30,7 @@ export default function Item({
29
30
tabIndex={0}
31
>
32
<Link enforceA={enforceA} openNewTab={openNewTab} to={link}>
- {icon}
33
+ {accessibleIcon}
34
{title}
35
</Link>
36
</li>
0 commit comments