Hooking into AJAX
-
Hi
Sadly ai1ec currently does not comply with WCAG accessibility guidelines – it throws up plenty of errors and warnings on the WAVE Firefox/Chrome extension, for example.
So for the time being I’m having to retrofit on a website that uses it, to at least get rid of the errors and make keyboard navigation work. I’m defaulting to Expand All, and using a bit of CSS and some simple JS hooking into wp_footer.
When initially loaded, https://gittisham.org.uk/events/ is now error-free. However, the JS is lost when the date is changed. So how do I hook into the Ajax query?
For info, the JS is:
var x = document.getElementsByClassName("ai1ec-fa"); for (i = 0; i < x.length; i++) { x[i].setAttribute("aria-hidden", "true"); } var x = document.getElementsByClassName("ai1ec-fa-plus-circle ai1ec-fa-lg"); for (i = 0; i < x.length; i++) { x[i].innerHTML = "Expand"; } var x = document.getElementsByClassName("ai1ec-fa-minus-circle ai1ec-fa-lg"); for (i = 0; i < x.length; i++) { x[i].innerHTML = "Collapse"; } var x = document.getElementsByClassName("ai1ec-fa-chevron-left"); for (i = 0; i < x.length; i++) { x[i].innerHTML = "Earlier"; } var x = document.getElementsByClassName("ai1ec-fa-chevron-right"); for (i = 0; i < x.length; i++) { x[i].innerHTML = "Later"; } var x = document.getElementsByClassName("ai1ec-fa-print"); for (i = 0; i < x.length; i++) { x[i].innerHTML = "Print"; } document.getElementById("ai1ec-agenda-collapse-all").setAttribute("href", "#"); document.getElementById("ai1ec-agenda-expand-all").setAttribute("href", "#");And this topic is related to two current and one closed topic, none of which have received answers:
- https://ww.wp.xz.cn/support/topic/modifying-the-all-in-one-event-calendar-plugin-how-to-hang-up-an-event/
- https://ww.wp.xz.cn/support/topic/wcag-2-1-compliance-accessibility/#post-12798119
- https://ww.wp.xz.cn/support/topic/accessibility-redundant-links-in-widget/
And https://websitesahoy.co.uk/dev3/ has the basic plugin installed to demonstrate all the errors (a development area so pw protected – I can supply).
Thanks
ClareThe page I need help with: [log in to see the link]
The topic ‘Hooking into AJAX’ is closed to new replies.