What Should Be Avoided
HTML/CSS
<div id="login-link">Log in</div> <style> #login-link { display: inline-block; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; background-color: #000; /* Add a valid color */ color: white; } </style> <script> const link = document.querySelector("#login-link"); link.addEventListener("click", () => { window.location.href = "https://login.tabnav.com"; }); </script>
Explanation:The customized link seems to work well for most visual users. When clicked, it takes them to the next page. However, keyboard users cannot navigate to the link because it is not included in the tabindex elements of the DOM. Even if it were included, it wouldn't offer any keyboard functionality, only mouse functionality.