ngneat / svg-icon

👻 A lightweight library that makes it easier to use SVG icons in your Angular Application
https://netbasal.com
MIT License
260 stars 35 forks source link

Support ARIA attributes on SVGs #30

Closed fynnfeldpausch closed 3 years ago

fynnfeldpausch commented 3 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

I did not find a way to set ARIA attributes like aria-hidden or aria-label on the SVG element.

Expected behavior

I am able to set those attributes via the directive. Best would be to set aria-hidden by default and remove it if a label is supplied via an input. This is also the default behavior of Angular Material.

What is the motivation / use case for changing the behavior?

This would greatly help us improve the accessibility of our site.

Environment


Angular version: 11.1.1

Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX            
NetanelBasal commented 3 years ago

Do you want to create a PR?

fynnfeldpausch commented 3 years ago

Will do as soon as I find the time this week. 👍

NetanelBasal commented 3 years ago

Released in v3.1.0

fynnfeldpausch commented 3 years ago

Sry, didn't find the time during the week but many thanks for taking care of this