Page MenuHomePhabricator

Hidden radio buttons on history can still be selected with arrow keys on Firefox
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce:

  • Open a revision history page, e.g. that for w:Main Page, with Firefox.
  • Click on a visible radio button.
  • Use arrow keys to move the selection.

What happens?:

  • The selection goes away. If you click "Compare selected revisions", it navigates to a diff showing the same revision on both panes (which says "No difference", of course) or a diff showing revisions in the wrong order (the newer one on the left and the older one on the right in LTR).

What should have happened instead?:

  • Only visible buttons can be selected, and the arrow-key navigation loops once you hit a "dead end".

1.png (1×927 px, 111 KB)
2.png (1×927 px, 112 KB)
3.png (1×927 px, 113 KB)

Event Timeline

Nardog renamed this task from Hidden radio buttons can be selected on Firefox to Hidden radio buttons on history can be selected on Firefox.Sep 10 2021, 6:03 AM

Change 720301 had a related patch set uploaded (by Nardog; author: Nardog):

[mediawiki/core@master] Disable hidden radio buttons on page history to fix behavior on Firefox

https://gerrit.wikimedia.org/r/720301

Nardog renamed this task from Hidden radio buttons on history can be selected on Firefox to Hidden radio buttons on history can still be selected with arrow keys on Firefox.Sep 11 2021, 2:36 PM

Change 720301 merged by jenkins-bot:

[mediawiki/core@master] Disable hidden radio buttons on page history to fix behavior on Firefox

https://gerrit.wikimedia.org/r/720301

matmarex assigned this task to Nardog.
matmarex added a subscriber: matmarex.

I'm really surprised that no one reported this problem before (I looked for duplicates and did not find any). The code has been unchanged for years, and it affects not only recent Firefox, but seemingly every browser other than Chrome (I tested IE 11, as well as old Firefox 3.6 and Opera 12). Fascinating. Thanks for the patch!

@matmarex Thank you for reviewing the patch. I hope it didn't break anything. I wonder if the conditional on line 61 (querying a.mw-changeslist-date) could be replaced with something more future-proof, e.g. giving a class to <li> with inaccessible revisions server-side.

Perhaps it could, but your solution seemed fine to me.