• I may getting notice of the aria labels not showing in content views Read more section. I don’t see where to add or make sure a setting has been done correctly. I need to get these links in Content view aria labels compliant….am I missing a setting? I don’t see anything for aria label under the content view settings.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Content Views

    (@pt-guy)

    Hello,
    Thank you for contacting us.

    Please add this code to file functions.php in the theme’s folder (or install this plugin Code Snippets then add this code to a new snippet):

    // Content Views Pro - add aria-label to links
    add_filter( 'pt_cv_link_html', 'cvp_theme_add_aria_label_to_link', 100, 2 );
    function cvp_theme_add_aria_label_to_link( $args, $data ) {
    	$title	 = esc_attr( get_the_title() );
    	$args	 = str_replace( '<a', '<a aria-label="' . $title . '"', $args );
    	return $args;
    }

    Best regards,

Viewing 1 replies (of 1 total)
  • The topic ‘aria label’ is closed to new replies.