Created
May 23, 2015 17:01
-
-
Save joedolson/0b2ac3b2d778a599d81d to your computer and use it in GitHub Desktop.
These links will be impossible to find if they're just links; we'll wrap them in an aria landmark element and add a heading.
This file contains 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
/* | |
* Fetch HTML for links and wrap in a container. Add heading and ARIA landmark role. | |
* | |
* @param integer $post_ID of current post. | |
* | |
* @return full HTML block. | |
*/ | |
function id24_social_block( $post_ID ) { | |
$links = id24_create_links( $post_ID ); | |
$html = " | |
<nav aria-labelledby='id24-social-sharing'> | |
<h3 id='id24-social-sharing'>" . __( 'Share This Post', 'id24-social-sharing' ) . "</h3> | |
<div class='id24-social-share'> | |
$links | |
</div> | |
</nav>"; | |
return $html; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment