mirror of
https://github.com/10h30/display-featured-image-genesis.git
synced 2026-07-11 18:46:03 +09:00
Add tabindex to image links if title is included
This commit is contained in:
@@ -124,7 +124,7 @@ class DisplayFeaturedImageGenesisOutputCPT {
|
||||
}
|
||||
$image = $this->get_image( $title );
|
||||
if ( $image ) {
|
||||
$role = empty( $this->instance['show_title'] ) ? '' : 'aria-hidden="true"';
|
||||
$role = empty( $this->instance['show_title'] ) ? '' : 'aria-hidden="true" tabindex="-1"';
|
||||
printf( '<a href="%s" title="%s" class="%s" %s>%s</a>', esc_url( $permalink ), esc_html( $title ), esc_attr( $this->instance['image_alignment'] ), $role, $image );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ class DisplayFeaturedImageGenesisOutputTerm {
|
||||
);
|
||||
|
||||
if ( $this->instance['show_image'] && $image ) {
|
||||
$role = empty( $this->instance['show_title'] ) ? '' : 'aria-hidden="true"';
|
||||
$role = empty( $this->instance['show_title'] ) ? '' : 'aria-hidden="true" tabindex="-1"';
|
||||
printf( '<a href="%s" title="%s" class="%s" %s>%s</a>', esc_url( $permalink ), esc_html( $title ), esc_attr( $this->instance['image_alignment'] ), $role, wp_kses_post( $image ) );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user