The B.C. Design System helps public sector design and development teams build consistent, accessible products
56
stars
38
forks
source link
Add accessible titles and aria-hidden support to React icon components #436
Open
mkernohanbc opened 1 month ago
For commonly-used SVG icons that we implement (or have already implemented) as React components, we should explore adding support for:
<title>
attributearia-hidden
and/oraria-labelledby
Without these, I suspect we risk allowing accessibility violations to creep in as we reuse these icon components.
In terms of basic implementation, I think this looks something like:
title
prop to populate<title>
attribute on the<svg>
elementaria-hidden="true"
if no title is provided@ty2k I'm happy to take a first pass at implementing this myself, but would appreciate your thoughts on whether my assumptions here are valid?