Last active
May 24, 2023 17:09
-
-
Save dieppon/e65694c828a99f1eb7a45fdb4b5563a7 to your computer and use it in GitHub Desktop.
Adds an invisible descriptive text to the CTA button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/includes/display.php b/includes/display.php | |
index 3d0e070..0ab7fa6 100644 | |
--- a/includes/display.php | |
+++ b/includes/display.php | |
@@ -170,7 +170,7 @@ class ANCR_Display{ | |
$attrs[ 'rel' ] = 'nofollow noreferrer'; | |
} | |
- $html .= '<a ' . ANCR_Utilities::build_attrs( $attrs ) . '>' . wp_kses_post( $button[ 'text' ] ) . '</a>'; | |
+ $html .= '<a ' . ANCR_Utilities::build_attrs( $attrs ) . '>' . wp_kses_post( $button[ 'text' ] ) . ($button[ 'title' ] ? '<span class="visually-hidden"> ' . $button[ 'title' ] . '</span>' : '') .'</a>'; | |
} | |
$html .= '</div>'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment