E-mail List Archives
Re: "Go to Top" element, link or button
From: Glen Walker
Date: Jan 17, 2023 4:52PM
- Next message: Srinivasu Chakravarthula: "Re: "Go to Top" element, link or button"
- Previous message: Rick: ""Go to Top" element, link or button"
- Next message in Thread: Srinivasu Chakravarthula: "Re: "Go to Top" element, link or button"
- Previous message in Thread: Rick: ""Go to Top" element, link or button"
- View all messages in this Thread
Links are for navigating, whether to a new page or a different location on the same page, so it sounds like you should have a link.
If the user can use the browser's âbackâ button and navigate back to where they were before they selected the âgo to topâ element , then that's another argument that it should be a link.
But I can understand if someone argues for a button since this feels like an immediate action.
For me, it comes down to how it's implemented. If you make it a button and then you programmatically move the focus to the top of the section, then the user can't use the browser's back button and it would be OK to be a button instead of a link.
My first choice would be a link and use the browser's built-in functionality to move the focus for you. But I wouldn't fail WCAG if a button was used and implemented as mentioned above.
- Next message: Srinivasu Chakravarthula: "Re: "Go to Top" element, link or button"
- Previous message: Rick: ""Go to Top" element, link or button"
- Next message in Thread: Srinivasu Chakravarthula: "Re: "Go to Top" element, link or button"
- Previous message in Thread: Rick: ""Go to Top" element, link or button"
- View all messages in this Thread