Yoast / wordpress-seo

Yoast SEO for WordPress
https://yoast.com/wordpress/plugins/seo/
Other
1.77k stars 894 forks source link

Improve links in plugin by enforcing proper aria-labels etc #8074

Open jcomack opened 7 years ago

jcomack commented 7 years ago

Currently whenever we need to add a new link to the interface, a lot of this is dependent on the developer. This means that things like rel="noopener noreferrer" when adding target="_blank", aria-label etc are easily forgotten.

To improve this, we should attempt to add a simple link util function that can take in some basic information and ensure that properly formatted and secure links are returned.

afercia commented 5 years ago

Related: #4605 see https://github.com/Yoast/wordpress-seo/issues/4605#issuecomment-465516203

For the plugin, I'd like to propose a small PHP utility function to wrap a link