Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1413490

    Hi. How can I change aria-hidden on Cookie consent from true to false? As it is now it is not in accordance with wcag.

    Regards
    Nina

    #1413555

    Hey Advantage09,

    Thank you for the inquiry.

    You have to modify the enfold/includes/helper-privacy.php file and edit this code around line 1758.

    // Avoid that screen reader prioritize cookie container and ignore page content
    $screen_reader = " aria-hidden='true' ";
    

    Best regards,
    Ismael

    #1413601

    It was the other way arround, it is default to true and I changed it to false. :) This looks like it works. Can I just add this snippet to my functions file in my child theme? Or do I need to create the same tree structure in my child theme and copy it over? To avoid it beeing overwritten when I update the theme.

    Regards

    #1413797

    Hi,

    Thank you for the update.

    Unfortunately, it is not possible to override the includes/helper-privacy.php file by creating a copy of it in the child theme. You will have to do this modification directly. If that is not acceptable, try to use this script instead.

    function ava_custom_script_c() { 
    	?>
    	<script>
    		(function($) {
    			$(document).ready(function() {
    				$('.avia-cookie-consent').attr('aria-hidden', 'false');
    			});	
    		}(jQuery)); 
    	</script>
    	<?php
    }
    add_action('wp_footer', 'ava_custom_script_c');
    

    Best regards,
    Ismael

    #1413813

    maybe a tabindex="-1" will do a better job

    tabindex="-1" means that an item is only focusable programatically.
    aria-hidden="true"means that item is completely removed from the accessibility tree.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.