- This removes an inline event handler
- This also adds an aria-label
Using javascript instead of just using <a></a> is bad practice regarding accessibility and automated processing of web pages. Even the browser doesn't show a hint if hovering badges when using the old implementation. This in my opinion is a good way to replace inline event handlers in that code.
This greatly reduces the number of inline styles in the project and enhances maintainability by avoiding a lot of duplicate code.
This also reduces the number of hashes required for a CSP since all previous background-image inline styles are now in main.css.