Site logo

Archived topic

adding aria class to lightweight social icons

3 replies · Started by Drew on April 17, 2018

Viewing posts 1–4 of 4

Is there a way to add an aria class to the lightweight social icons (via your LSP plugin)? Perhaps with a custom function of some sort?

Specifically, I need to hide these icons to screen readers so they don't get mixed up with unidentified characters by moving them into their own <span> class (not sure if a different inline tag would work or not). From there, giving that <span> an aria-hidden="true" attribute while making sure no other content is contained within the <span> is what I'm trying to accomplish.

Many thanks,
Drew

Currently that isn't possible unfortunately.

What you could do is build your own icons with Font Awesome. That way you can add any and all necessary HTML.

Gotcha, I'll have to check another solution then or just do exactly what you suggested and build something out directly. If you know of anything else that accommodates that accessibility requirement, I'm all ears :)

Thanks!

I would definitely just go the Font Awesome route - that way you have full control.

This archived topic is closed to new replies.