sindresorhus/refined-github

modify `navigate-pages-with-arrow-keys` to match GitHub's `n` / `p` keys #4742

shinenelson posted onGitHub

Description

from https://github.com/sindresorhus/refined-github/pull/4691#issuecomment-907578663

I think n/p has existed for a while actually. It might make more sense to change our feature to match n/p in order to extend it to more pages. Arrows feel wrong accessibility-wise.

While I agree with the change, I did a quick test to check whether the change was feasible. p is used as a hotkey for the Project filter on issues and pull request lists. I feel that the hotkey is most used on the issues and pull request lists.

Here are 2 options that I could think of ( both after modifying the feature to match GitHub's choice of n / p across all other supported pages ) :

  1. Maintain the arrow keys functionality for issues and pull request lists.
  2. Drop the feature for issues and pull request lists

Either way, there is going to be a feature rename and migration that would be required.

Example URLs


Arrow key fans here (😄), can't we just support both?

posted by kidonng over 3 years ago

can't we just support both?

I thought about that too after I made https://github.com/sindresorhus/refined-github/pull/4691#issuecomment-907690478; but then I realized that it would not make sense ( and probably not work ) with 2 data-hotkey attributes for the same element.

posted by shinenelson over 3 years ago

@fregante, @yakov116 which among the 2 suggested options do you prefer to be implemented? Or do you have better suggestions?

posted by shinenelson over 3 years ago

oh, and I also forgot about another observation that I made yesterday :

[it does not work] when follow-file-renames was in effect ( because it is loaded after navigate-pages-with-arrow-keys ); perhaps we should add an ordering rule for the 2 features.

posted by shinenelson over 3 years ago

Definitely not both, we should pick one. Since GitHub uses n/p it would make sense to match them, but I don't feel strongly to make the change yet, unless there are already other pages using n/p on GitHub.

posted by fregante over 3 years ago

This request was addressed in the open PR, which now only renames the feature instead.

posted by fregante over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests