Home Forums WoodMart support forum Change a meta in head for accesibility

Change a meta in head for accesibility

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

    Isabel
    Participant

    Hi,

    In order to obtain a subsidy from the Spanish Government, the online stores has to pass an accessibility test.

    In the page speed insight, an error appears about this meta:

    <meta name=”viewport” content=”width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no”>

    And direct us to this information > https://dequeuniversity.com/rules/axe/4.7/meta-viewport
    where it says:

    1. the user-scalable=”no” parameter from the <meta name=”viewport”> shoud be removed in order to allow zooming for people with low vision who rely on screen magnifiers to properly see the contents of a web page.

    2. Ensures the maximum-scale parameter is not less than 2.

    Please, can you help me to solve this issue?

    Thank you in advance
    Isabel

    Attachments:
    You must be logged in to view attached files.
    #467946

    Isabel
    Participant

    Hi!

    I have found a solution in the forum going Theme Settings > Other > Viewport tag > Scalable

    Can you tell me how to solve about point 2: Ensures the maximum-scale parameter is not less than 2.

    Thank you
    Isabel

    #468106

    Luke Nielsen
    Keymaster

    Hello,

    Please add the below code to the functions.php file in your child theme and change the maximum-scale value that suits you.

    if ( ! function_exists( 'woodmart_meta_viewport' ) ) {
    	/**
    	 * Meta viewport tag.
    	 */
    	function woodmart_meta_viewport() {
    		?>
    		<?php if ( 'not_scalable' === woodmart_get_opt( 'site_viewport', 'not_scalable' ) ) : ?>
    			<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    		<?php else : ?>
    			<meta name="viewport" content="width=device-width, initial-scale=1">
    		<?php endif; ?>
    		<?php
    	}
    
    	add_action( 'wp_head', 'woodmart_meta_viewport' );
    }

    Kind Regards

    #468126

    Isabel
    Participant

    Thank you very much for your help
    Best regards
    Isabel

    #468130

    Luke Nielsen
    Keymaster

    Hello,

    You are welcome! If you do not mind, can you please leave 5 stars rating for our theme by going here: http://themeforest.net/downloads It will allow us to release more updates and provide dedicated support in the future. It would encourage our work a lot. If you like our Theme and Support.

    Have a great day.

    Kind Regards

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Change a meta in head for accesibility’ is closed to new replies.