**Steps to replicate the issue** (include links if applicable):
* Go to [[ https://fr.wikipedia.org/wiki/Comt%C3%A9s_de_l%27%C3%89tat_du_Delaware#Liste_des_comtés | this page ]] on the French Wikipedia.
* Click on "(en)" after the red link "HASC" in the sortable table.
**What happens?**:
The sortable table is sorted.
**What should have happened instead?**:
We should have been sent to https://en.wikipedia.org/wiki/Hierarchical_administrative_subdivision_codes (the target of the link) instead.
**Software version** (skip for WMF-hosted wikis like Wikipedia):
**Other information** (browser name/version, screenshots, etc.):
The issue has been discussed on [[ https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Le_Bistro/20_octobre_2022#Bug_:_{{lien}}_x_tableau_triable | the French Wikipedia village pump ]].
I think the issue comes from the fact that the <a> tag contains a <span> tag. In the [[ https://phabricator.wikimedia.org/source/mediawiki/browse/master/resources/src/jquery.tablesorter/jquery.tablesorter.js | jquery.tablesorter.js code ]], line 932, I think the second condition should be "e.currentTarget.nodeName.toLowerCase() === 'a'" instead of "e.target.nodeName.toLowerCase() === 'a'" so that the <a> tag is considered when clicking instead of the <span> tag. When trying with the updated code, the bug is fixed on this page.
Note: three other issues ([[ https://phabricator.wikimedia.org/rMW0cf738961b422905737e66b4124f031b549ef4f3 | here ]], [[ https://phabricator.wikimedia.org/rSVN99031 | here ]] and [[ https://phabricator.wikimedia.org/rMW28dc1840f5b7c788eee82eab897f91468e13bc89 | here ]] are similar but date back from 2011 and are not helpful.