bcgov / design-system

The B.C. Design System helps public sector design and development teams build consistent, accessible products
https://gov.bc.ca/designsystem
Apache License 2.0
56 stars 38 forks source link

Add accessible titles and aria-hidden support to React icon components #436

Open mkernohanbc opened 1 month ago

mkernohanbc commented 1 month ago

For commonly-used SVG icons that we implement (or have already implemented) as React components, we should explore adding support for:

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:

@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?

mkernohanbc commented 1 month ago

POC for this fix: https://github.com/bcgov/design-system/compare/main...436-svg-accessible-titles-aria-hidden