vbenjs / vite-plugin-svg-icons

Vite Plugin for fast creating SVG sprites.
MIT License
801 stars 109 forks source link

Global sprite should have a aria-hidden="true" attribute #90

Open zhell opened 1 year ago

zhell commented 1 year ago

Hi, I really love the plugin, I've been using it on almost all my front-end from scratch projects. On thing I noticed, is in terms of accessibility, the sprite appended to the page should have an aria-hidden="true" attribute, preventing the screen reader's ability to focus on it, even if it's positioned outside of the screen via css.

beakid commented 1 year ago

Came here to say the same! 👍

EDIT: A temporary solution is to add #__svg__icons__dom__ { display: none; }

to your css file.