a11y bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar ankushx01-dev
ankushx01-dev
5 Mar 2026

Ensured that the Back-to-Top link in the Cassiopeia template points to a valid target by adding an id="top" anchor at the top of the page.

Fixes #45679

Pull Request resolves #45679.

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

Added an id="top" anchor to the page so the Back-to-Top link points to a valid target.
This follows accessibility best practices by keeping the semantic anchor link instead of modifying its role attribute.

Testing Instructions

  1. Install Joomla and use the Cassiopeia template.
  2. Enable the "Back to Top" option in the template settings.
  3. Scroll down the page and click the Back-to-Top link.
  4. Verify that the link navigates to the top of the page using the id="top" anchor.

Actual result BEFORE applying this Pull Request

The Back-to-Top link may not point to a valid target, which can cause accessibility warnings in automated tools.

Expected result AFTER applying this Pull Request

The Back-to-Top link correctly navigates to the element with id="top", following accessibility best practices for anchor navigation.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar ankushx01-dev ankushx01-dev - open - 5 Mar 2026
avatar ankushx01-dev ankushx01-dev - change - 5 Mar 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2026
Category Front End Templates (site)
avatar ankushx01-dev ankushx01-dev - change - 5 Mar 2026
The description was changed
avatar ankushx01-dev ankushx01-dev - edited - 5 Mar 2026
avatar ankushx01-dev ankushx01-dev - change - 5 Mar 2026
The description was changed
avatar ankushx01-dev ankushx01-dev - edited - 5 Mar 2026
avatar brianteeman
brianteeman - comment - 7 Mar 2026

why add a role to change the semantic meaning of an a ? if you want it to be a button then change it to button

BUT please note that either with or without that change does not mean it is correct. Passing an automated test does not mean it is correct it just means you passed a test.

Have you researched accessibility best practices for back-to-top links and followed their advice or did you just rely on passing a test

avatar ankushx01-dev
ankushx01-dev - comment - 9 Mar 2026

Thank you for the feedback.

I understand that adding role="button" to an anchor element may not be the correct semantic approach. I will review accessibility best practices for back-to-top links and update the implementation accordingly instead of relying only on the Axe DevTools warning.

I will update the PR shortly.

avatar ankushx01-dev ankushx01-dev - change - 9 Mar 2026
Labels Added: PR-5.4-dev
avatar drmenzelit
drmenzelit - comment - 12 Mar 2026

@ankushx01-dev can you please actualize the description of the PR? Adding the id #top is a correct solution, but the description includes other things you have already removed from the code.
And also update your branch.
Thank you.

avatar ankushx01-dev ankushx01-dev - change - 12 Mar 2026
Labels Added: a11y bug
avatar ankushx01-dev ankushx01-dev - change - 12 Mar 2026
The description was changed
avatar ankushx01-dev ankushx01-dev - edited - 12 Mar 2026
avatar ankushx01-dev
ankushx01-dev - comment - 12 Mar 2026

Thank you @drmenzelit for the feedback. I have updated the PR description to reflect the current implementation using the id="top" anchor and synced the branch with the latest 5.4-dev.

avatar richard67
richard67 - comment - 13 Mar 2026

and synced the branch with the latest 5.4-dev.

@ankushx01-dev It does not need that always when GitHub shows the branch is not up to date. It is only necessary when there are conflicts shown and resolved. Unnecessary branch updates keep our resources unnecessarily busy.

avatar ankushx01-dev
ankushx01-dev - comment - 13 Mar 2026

Thanks for the clarification! I’ll keep that in mind and only update the branch when there are conflicts.

avatar HLeithner HLeithner - change - 17 Mar 2026
Title
Fix accessibility issue with Back-to-Top link
[5.4] Fix accessibility issue with Back-to-Top link
avatar HLeithner HLeithner - edited - 17 Mar 2026

Add a Comment

Login with GitHub to post a comment