Page MenuHomePhabricator

"v" Access Key to compare selected revision in history duplicated for buttons and for "Edit" (via VE)
Open, MediumPublic

Description

Page histories have 2 buttons for comparing the selected revisions, but both have the same access key ("v" on mediawiki-org). This cause on Mozilla Firefox to altern focus between both buttons when using the access key instead of directly trigger one of the two buttons.

Since both buttons have the same purpose, I propose to just remove the accesskey of one of them, so only the button at the top would have accesskey. That would fix the issue.


Version: 1.23.0
Severity: minor
URL: http://www.mediawiki.org/w/index.php?title=Manual:FAQ&action=history
See also:

Details

Reference
bz24977

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:09 PM
bzimport set Reference to bz24977.
bzimport added a subscriber: Unknown Object (MLST).

This is broken again (since r108372 I think).

Nowadays Alt+Shift+V (at least in Firefox) is used by three tools:

  • "Edit" in the top bar (via Visual Editor)
  • the "Compare selected versions" top button on &action=history
  • the "Compare selected versions" bottom button on &action=history

While the technical fix might be easy, coming to an agreement which item should keep its access key might not. Hence removing keyword.

I think the problem with visual editor is a separate bug (Bug 52969). The problem with the duplicated accesskey in page histories will still be a bug even if either visual editor or page histories change to another accesskey. And it is also still a bug for anyone not using the Visual Editor extension.

What is needed for this bug is that the accesskey is removed from either the top or the bottom compare buttons. There might be some few users who will disagree about choosing button which should have the accesskey, but I think they will only have minor problems getting used to only using the chosen button. Most users will just be happy that the bug is fixed.

TheDJ set Security to None.

Since the introduction of the single edit tab, there’s only one edit tab by default again, which has the access key e, so removing one button’s access key would solve the problem for most users and for all users in most namespaces.

r72424 fixed this by almost duplicating the button code. Making one string for the buttons without accesskey to be returned by getStartBody(), and very similar code making a string for buttons with accesskey that is stored in $this->buttons for later use by getEndBody().

That fix was broken in r108372. Where the duplicate code is removed and only one string with accesskey is stored in $this->buttons, and used by both getStartBody() and getEndBody().

Current code in HistoryPager.php has changed a bit, but is similar to r108372 with only one button string used both at the start and the end.

Maybe the button code can be moved to a function makeButtons( bool ) that returns the string with accesskey if parameter is true and without accesskey if it is false? Then you don't have duplicated code but you can have the accesskey for only one button.

(The accesskey should be on the button in getStartBody(), since getEndBody() doesnt add buttons if there are only two revisions.)