• Resolved Mikko Siikaniemi

    (@mikrogramma)


    Thanks for the great plugin!

    I recently attended WordCamp Europe 2017, where Rian Rietveld gave a talk on accessibility. I tried to make my site more accessible following her instructions and used aXe accessibility checker to check for any warnings. It noted that the SVG files are missing alt text.

    To overcome this, I followed CSS-Tricks article on accessible SVG and added title tag and aria-labelledby attribute.

    Now, it seems the plugin strips out aria-labelledby completely. I believe this is part of the SVG sanitizing process.

    Would it be possible to add a filter to add allowed attributes thus preventing filtering of these?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Daryll Doyle

    (@enshrined)

    Hi @mikrogramma,

    Thanks for bringing this up!

    This is something I have to admit I’d not thought about before but I’ll be happy to look into a fix for it. I’ve opened a bug on the underlying library whilst I work on a fix (https://github.com/darylldoyle/svg-sanitizer/issues/13) and as soon as I’ve got that working I’ll update the plugins to include the updated lib.

    Cheers,
    Daryll

    Plugin Contributor Daryll Doyle

    (@enshrined)

    Hey @mikrogramma,

    Thanks for bringing this issue to my attention. I’ve now updated the library and both free and pro plugins to whitelist the role, aria- and data- attributes.

    This should fix any of the issues you’ve been seeing but feel free to re-open the issue should it persist!

    Cheers,
    Daryll

    Thread Starter Mikko Siikaniemi

    (@mikrogramma)

    Thanks Daryll, amazingly fast patch to fix the issue! Everything seems to be in order. Cheers!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘SVG sanitizing strips out ARIA attributes’ is closed to new replies.