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
{{ message }}
Repository navigation
Accessibility improvement : "back to top" icon #5337
Accessibility audits have reported that the "bask to top" button is too small and with improper "role" attribute:
<prole="navigation" id="back-to-top"><ahref="#title"><abbrtitle="Back to Top">↑</abbr></a></p>
Excerpt from accessibility audit:
the “back to top” link is too small and hard to see. It is difficult to click with a mouse or tap with a finger on mobile phones and tablets.
The link's source code contains role="navigation", but this role should only be used for a group of navigation links that help users move around the website (like the main menu, footer, or breadcrumbs). Also, the link text is just an arrow inside an tag. Some screen readers ignore this tag, meaning they might only read "link, up arrow" or "link, empty".
How-to fix
Increase the size and visibility: Make the button larger (at least 44x44 pixels for a good touch target) and improve its colour contrast.
Clean up the code: Remove role="navigation" from the <p> tag.
Add an accessible name: Use an aria-label on the link so screen readers know exactly what it does, and hide the visual arrow from assistive technologies using aria-hidden="true".
updated code example:
<pid="back-to-top"><ahref="#title" aria-label="Back to top"><spanaria-hidden="true">↑</span></a></p>
Activity
marcoscaceres commentedon Aug 19, 2026
@tfrancart can you take a look at #5391 ? How does that look?