Problem/Motivation

The icon does not have a text label which is an accesibility issue.

a11y issue error; text label missing

Solutions

An easy solution would be to add a `aria-hidden="true"` to the svg element. This would keep it out of the accesibility tree.
The icon should then only be used as a decorative icon.

More extensive solution would be to add an option to hide it from the accesibility tree or to ability to add accessible text label.
The are multiple ways of achieving this.
https://www.sarasoueidan.com/blog/accessible-icon-buttons/
https://www.scottohara.me/blog/2019/05/22/contextual-images-svgs-and-a11...
https://www.smashingmagazine.com/2021/05/accessible-svg-patterns-compari...

CommentFileSizeAuthor
iconify-field--a11y--text-label.png16.4 KBstrnbrg

Comments

strnbrg created an issue. See original summary.

dobefu’s picture

Version: 1.0.0-rc4 » 1.0.0
Assigned: Unassigned » dobefu
Priority: Normal » Major

Interesting, it appears that my tools did not pick it up. I'll go for the simpler solution for now, since #3450660 will allow for better configuration when it's done.

dobefu’s picture

Assigned: dobefu » Unassigned
Status: Active » Fixed

This has been fixed in https://git.drupalcode.org/project/iconify_field/-/merge_requests/10, and will be in the next release. Thank you for shopping with us

dobefu’s picture

Status: Fixed » Closed (fixed)