I created this plugin to make external text links more accessible to people with disabilities by displaying an image with an alternative that informs the user that the link will open in a new window. Thanks to Romain Gervois.
- Upload
accessible_external_links
folder to the /wp-content/plugins/
directory
- Activate the plugin through the 'Plugins' menu in WordPress
- Go into the admin panel of the plugin and fill the 'Image alternative text (alt attribute content)' field with the alternative you fish to display default : "Opens in a new window"
- add a class of "external" on the links you wish to open in a new window.
For example use
<a class='external' href='your link url'>My Link</a>
If you encounter some problems with icon positionning you can add a class of :
a.external img{}
in your theme
style.css
file to control the image positionning