I am using svg sprite but our site is using AudioEye to do accessibility validation and all the svgs are marked as being a high level error because they don’t have an accessible name.
The easiest way to handle it seems to me to put an aria hidden on the svg – like so
<svg aria-hidden="true" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
.... paths in here
</svg>
but when the svg sprite gets built the aria-hidden attribute is not found. I suppose I need to have a way to specify attributes to copy over or add in the configuration
"shape": {
"id": {
"generator": "ec-%s"
},
"transform": [
{
"svgo": {
"plugins": [{ "convertColors": { "currentColor": true } }]
}
}
]
},
"svg": {
"xmlDeclaration": false,
"rootAttributes": {"aria-hidden": "true"}
},
but aria-hidden attribute does not come out on the children svgs of the parent svg that wraps them, and it doesn’t come out on the parent svg either!
Personally what i would like is for the attributes I put on every svg file would get copied to the output.