Steps to replicate the issue (include links if applicable):
- Press access key for my user page (Alt+Shift+. on Firefox)
What happens?: Link to my user page in top-right corner is focused
What should have happened instead?: Link to my user page in top-right corner is clicked
Software version (skip for WMF-hosted wikis like Wikipedia): testwiki. MediaWiki 1.40.0-wmf.2 (e31f436)
Other information (browser name/version, screenshots, etc.): Firefox 101.0
Developer notes
The issue here is that there are two elements with the same access key. I suggest 1 of 2 solutions:
- Access key element
In JavaScript iterate through all elements with access keys and remove the access key and create a unique link at the bottom of the page with the access key. These should not be hidden in the DOM so that they are accessible to the keyboard. This element could be given a heading "Keyboard Shortcuts" in case we wanted it to be discoverable by screenreaders.
- matchMedia
Since Vector is a special case here we could add JavaScript which manages the access keys, making sure the accesskey attribute is removed from any links that get collapsed. We have classes like user-links-collapsible-item that make this easier.