Tagged: accessibility
-
AuthorPosts
-
October 29, 2020 at 10:32 pm #1256889
The data-avia-tooltip element that shows an icon to read more when you hover over an image on my site is found within an a tag, which has no text, just an icon. This is throwing an accessibility error in Monsido. How do I add an aria-label within this element? Where can I find the php code that’s spitting this out within my theme folders?
November 4, 2020 at 3:22 pm #1258293Hey,
Thanks for contacting us and sorry for the late reply!
– If you are not using a child theme, please switch to child theme – https://kriesi.at/documentation/enfold/child-theme/
– Add the code posted here in functions.php file of your child theme – https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb
– Go to /enfold/config-templatebuilder/avia-shortcodes/team/ and copy team.php file to your child theme inside /shortcode/ folder
– Open team.php file on your child theme and find following line$output.= "<a rel='v:url' {$tooltip} {$target} class='{$social_class} avia-team-icon ' href='" . esc_url( $social['attr']['link'] ) . "' {$display_char}>";
and change it to following
$output.= "<a aria-label='Here goes your label' rel='v:url' {$tooltip} {$target} class='{$social_class} avia-team-icon ' href='" . esc_url( $social['attr']['link'] ) . "' {$display_char}>";
Best regards,
YigitNovember 4, 2020 at 6:03 pm #1258371Thanks so much, Yigit. This looks like it’d do the trick. Do you happen to know where I could find the same thing for the prev/next buttons in the slideshow? Those are also throwing accessibility errors as “a” tags not containing text.
November 5, 2020 at 3:01 pm #1258614Hi,
You are welcome!
Please copy /enfold/config-templatebuilder/avia-shortcodes/av-helper-slideshow.php file to your child theme inside /shortcode/ folder and find
$html .= "<a href='#prev' class='prev-slide' " . av_icon_string('prev_big') . ">" . __( 'Previous', 'avia_framework' ) . "</a>"; $html .= "<a href='#next' class='next-slide' " . av_icon_string('next_big') . ">" . __( 'Next', 'avia_framework' ) . "</a>";
and change it to following
$html .= "<a aria-label='Here goes your label' href='#prev' class='prev-slide' " . av_icon_string('prev_big') . ">" . __( 'Previous', 'avia_framework' ) . "</a>"; $html .= "<a aria-label='Here goes your label' href='#next' class='next-slide' " . av_icon_string('next_big') . ">" . __( 'Next', 'avia_framework' ) . "</a>";
Best regards,
Yigit -
AuthorPosts
- You must be logged in to reply to this topic.