robcresswell / vue-material-design-icons

Material Design Icons as Vue Single File Components
https://npmjs.com/vue-material-design-icons
MIT License
162 stars 35 forks source link

feat: Require a title or decorative prop to be set #266

Closed drewm closed 1 year ago

drewm commented 3 years ago

Removes the automatic generation of a human readable title, instead requiring either a title or the decorative prop to be set. This enables automated accessibility testing (e.g. with aXe) without the auto-generated title providing a false positive.

This is important because the icon name (e.g. "Chevron Down") describes the icon and not the function it represents (e.g. "Expand menu options").

drewm commented 3 years ago

Potential issue I've noticed is that I'm mutating the title prop, which of course I shouldn't. Were this not a functional component, I'd add a computedTitle computed value. You'd mentioned maybe making this a regular component for Vue 3, so the approach to the fix depends on that a bit.

robcresswell commented 1 year ago

I thiiiink this was addressed by https://github.com/robcresswell/vue-material-design-icons/commit/c65d8ea786ea49210193cb3129c12a68ed6c0baf but let me know if there's more I can do