Conversation
✅ Deploy Preview for pine-icons ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| /** | ||
| * The `alt` attribute of the icon. | ||
| */ | ||
| "alt"?: string; |
There was a problem hiding this comment.
Have we considered using aria-hidden="true" instead of alt="" and role="img"? Since we typically use them as just decorative icons, it might avoid sending mixed signals to screen readers.
I briefly tried to find any usage of standalone icons (outside of button, link, etc), but haven't so far. Just an additional thought, and I may not fully be understanding the problem with the image role and the aria-label.
There was a problem hiding this comment.
This can be an option, yes. There's different avenues we can pursue for this. I added a quick meeting on the books to discuss the broader aspect of accessibility in Pine with our inherited attributes utility.
Description
Adds
altprop for accessibility purposes.Since this component has a role of
img, anaria-labelor equivalent is required to serve as the primary alternative text. Adding analtprop option helps improve a11y by providing additional information in cases where the icon does not render in the browser.Icon docs will updated in a separate PR for the Pine repo.
DSS-1386
Type of change
Please delete options that are not relevant.
If your type of change is not present, add that option.
How Has This Been Tested?
Please describe the tests you've added and run to verify your changes.
Provide instructions so that we can reproduce.
Please also list any relevant details for your test configuration.
Test Configuration:
Checklist:
If not applicable, leave options unchecked.