You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
role=button should be avoided as much as possible and instead the <button> tag should be used. It doesn't matter if a link aesthetically looks like a button. What really decides whether an interactive element is a button or a link is this:
Does clicking on it take you to a different page, or a different view, or a different section of the same page? It's a Link
Does clicking on it open a modal, switch a tab panel, toggle some item, open navigation in smaller screen? Basically it stays in the same page and doesn't go somewhere else. It's a Button
For example in the home page, all the "Learn More" links are given a role=button which is wrong since it goes to a separate page. So it's a link. We should remove all such role=button because it acts just like a <button> tag for assistive technology and confusing for users.
role=button
should be avoided as much as possible and instead the<button>
tag should be used. It doesn't matter if a link aesthetically looks like a button. What really decides whether an interactive element is a button or a link is this:For example in the home page, all the "Learn More" links are given a
role=button
which is wrong since it goes to a separate page. So it's a link. We should remove all suchrole=button
because it acts just like a<button>
tag for assistive technology and confusing for users.Refs: https://www.youtube.com/watch?v=8XjwDq9zG4I
The text was updated successfully, but these errors were encountered: