Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1449310

    Hi,
    is it possible to hide a column or colour section from screen readers?

    Thx.

    #1449438

    Hey nm,

    Thank you for the inquiry.

    This is possible, but there is no option for it by default. However, we can create a custom script that applies the aria-hidden attribute to any element with the “av-aria-hidden-el” class name. Please add this code to the functions.php file:

    function ava_custom_script_aria_hidden() {
        ?>
        <script>
            (function ($) {
                function g() {
                    $('.av-aria-hidden-el').attr('aria-hidden', 'true');
                }
    
                $(document).ready(function () {
                    g();
                });
            })(jQuery);
        </script>
        <?php
    }
    add_action('wp_footer', 'ava_custom_script_aria_hidden');
    

    Edit the column or color section element, then apply the “av-aria-hidden-el” class name in the Advanced > Developer Settings > Custom CSS Class field.

    Best regards,
    Ismael

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