I don’t understand your question. Are you asking if the “aria-label” attribute can or should be included in the form when rendered on the WordPress site?
Thread Starter
jrmedd
(@jrmedd)
Apologies for being vague! I’m wondering if the aria-labels can be included when the form is rendered on WP.
I can certainly add the attributes to the “white list” of things filtered from the Google generated HTML as long as I know what the attributes are and which elements they apply to.
However I wonder if it might make more sense to simply have an option to disable the HTML filtering. Do you have an opinion?
I was reading this and this and it looks like the aria-label and aria-labeledby attributes can be applied to quite a few elements. Are there more attributes to worry about?
Google Forms uses wp_kses() to filter the HTML.
Thread Starter
jrmedd
(@jrmedd)
Accessibility experts don’t like to filter out any valid HTML, so perhaps an option to disable filtering would be a good idea. I’ll see what our auditor thinks and bring back some more info, but I presume the most straightforward option right now will be to avoid filtering of any kind.
Are you able/willing to test a beta version if I add the ability to turn the filter off?
Thread Starter
jrmedd
(@jrmedd)
I certainly am. Thanks for your help.
I have added the ability to turn off the filtering which allows the aria attributes to come through. Details and beta download are on my web site.
Thread Starter
jrmedd
(@jrmedd)
Excellent! Thank you very much. I’ve given it a quick test, and it looks good. I’ll have to wait till next week for our accessibility auditor to test it more thoroughly, but it certainly doesn’t break anything, and the HTML looks identical to the form code when viewed on Google.
Thanks for turning this around so quickly, I’ll make sure a donation comes your way.
Thanks for the feedback. This is a fairly low risk change (which off by default) so I will likely release it in the next day or two if I don’t receive any negative feedback.
Thread Starter
jrmedd
(@jrmedd)
Great stuff. I’ll keep any eye out.
Thread Starter
jrmedd
(@jrmedd)
Hello again,
How’s the feedback been for this? I’ve only tested the BETA on a development server, and don’t have access to the plugins folder of the live site we’ll be using this for, so just wondering when I should tell our accessibility auditor when the plugin will be accessibility-friendly π
Thanks again!
I have not had any reports of problems and the beta has had 27 downloads so it looks solid. I push out a release sometime today, hopefully before lunch.