helloflask / bootstrap-flask

Bootstrap 4 & 5 helper for your Flask projects.
https://bootstrap-flask.readthedocs.io
Other
1.1k stars 189 forks source link

Support icon SVG accessibility #267

Open PanderMusubi opened 1 year ago

PanderMusubi commented 1 year ago

Please, first read the section Accessibility under https://icons.getbootstrap.com/#usage

The question is how to extend the icon render marcro to support aria-hidden="true" and aria-label="..."

Suggestion is to add aria-hidden="true" when an icon is rendered without title and without description. When a description is given (which is likely more detailed than a title) use the description in aria-label="...". Otherwise, when a title is given, use that in aria-label="...".