Support » Plugin: Page Visit Counter » Adding ALT or ARIA attributes to icons

  • Resolved iowilliam

    (@iowilliam)


    Hello. Thanks for you great plugin. I’m trying to validate a site using your plugin but I notice that the icons (which I have hidden) lacks the ALT attribute. In reality and for accessibility reasons it should have and empty ALT tag in addition to a aria-hidden="true" since it is a decorative element. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • if ($fetchSelecetedPostTypes == '' || $fetchSelecetedPostTypes == null) {
    				$html .= '<p id="page-visit-counter-shortcode-block" class="page-visit-counter-block" '.$text_color_page_visit.'><img aria-hidden="true" alt="" src="'.site_url().'/wp-content/plugins/page-visit-counter/images/1456175371_vector_65_14.png" /><span id="shortcode_'.$pageID.'" style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor_shortcode">'.$total.'</span>'.__('total visits.','page-visit-counter').'</p>';
    			} else {
    				$postTypeSelectedEncodeArr = json_decode($fetchSelecetedPostTypes);
    				if (in_array($post->post_type,$postTypeSelectedEncodeArr)) {
    					$innerSettings = get_post_meta($pageID,'enable_page_count',true);
    					if ($innerSettings == '' || $innerSettings == 'yes') {
    						$html .= '<p id="page-visit-counter-shortcode-block" class="page-visit-counter-block" '.$text_color_page_visit.'><img aria-hidden="true" alt="" src="'.site_url().'/wp-content/plugins/page-visit-counter/images/1456175371_vector_65_14.png" /><span id="shortcode_'.$pageID.'" style="margin-left: 5px;margin-right: 5px;" class="page_amount_visitor_shortcode">'.$total.'</span>'.__('total visits.','page-visit-counter').'</p>';

    This worked quite fine.

    Plugin Author MULTIDOTS

    (@dots)

    Hey @iowilliam,

    Thanks for your contribution when we release a new version we will implement this one.

    Regards,
    Multidots

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