For an accessibility standpoint, I’ve been asked to “create a MAIN landmark”, by placing the <main> element around all the page’s primary content or give the container element holding the page’s main content an attribute of role=”main”.
What is the cleanest way to do this in my child theme?
Hey hostworks,
Thank you for the inquiry.
You’ll find the main wrapper that contains all the content in the themes/enfold/header.php file, so creating or overriding the template in your child theme is the cleanest approach. Look for this code around line 279:
<div id='main' class='all_colors' data-scroll-offset='<?php echo avia_header_setting( 'header_scroll_offset' ); ?>'>
Let us know if you have more questions.
Best regards,
Ismael
Hi Ismael,
is it possible to do it also for other parts of the page like <header> <nav> and <footer>? Which php files should be edited?
Thank you!
Hi,
Thank you for the update.
For the main menu or navigation, check the includes > helper-main-menu.php
file and to modify the footer, you can edit the footer.php
file. Make sure sure to keep notes or logs of each modification in case the parent theme files are updated or changed in the future.
Best regards,
Ismael