So I inherited a WordPress website for an accessibility remediation, which means I need to make A LOT of changes to the core HTML to replace non-semantic elements with semantic elements (ex. replacing <div> tags with <a> tags, and such).
I’ve been a dev for 15 years but I only recently came back to WP. My experience is mostly developing custom themes with Bootstrap, coding them myself the old fashioned way, however this site in particular (as I was dreading in advance) was built using Elementor.
I made a quick search on customizing Elementor themese through code but all I found were steps to “add” custom code to Elementor, not changing the core code of the theme itself.
Is this even possible? I’m fearing the possibility of having to tell the client that these changes “cannot be done because the site is built with Elementor”
Thanks in advance!
[ad_2]
I don’t think it can be done.
I don’t think it can be done.
First of all, there’s an ocean-sized difference between theme and content code. You can 100% build and install a new theme your old-fashioned way, Bootstrap and all, and Elementor will still work just fine.
As for Elementor and accessibility, while it is *not* my preferred editor, accessibility expert Amber Hinds just did a major overview of builders and accessibility, and I was genuinely shocked that Elementor came in second only to Kadence blocks.
Specifically, unless the site uses Elementor carousels (bad for accessibility regardless) or accordions (also not great) or explicitly uses an Elementor menu instead of whatever the theme provides the actual content should be *relatively* compliant.
So, again, rebuild the theme with strict compliance in mind, don’t use carousels or accordions, and replace lingering non-compliant Elementor-widget-based content with regular Text or Code widgets and you should be able to at least pass WCAG 2.2 A compliance checks and maybe AA checks.
If instead you need to pass AAA checks then… yeah, you’re going to have your work cut out for you, but that would be true regardless.