Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After 2.1.0 upgrade, cannot open selected article by pressing Return key #2366

Closed
jman-schief opened this issue Feb 18, 2024 · 4 comments · Fixed by #2372
Closed

After 2.1.0 upgrade, cannot open selected article by pressing Return key #2366

jman-schief opened this issue Feb 18, 2024 · 4 comments · Fixed by #2372
Labels
bug Bug Report

Comments

@jman-schief
Copy link

jman-schief commented Feb 18, 2024

hello,

discovered another difference when using Miniflux with the keyboard.

Previously I could open a selected article by pressing the Return key. Now this doesn't work anymore. The key o still works, as per documentation.

I assume this is an effect of <div class="items"> having lost the property dir=auto, correct?

I would not strictly call this a bug because it was not documented, perhaps more a XKCD 1172 situation 🙂 but it would be nice to have it back

@rluetzner
Copy link

The same is true when looking at categories. Previously I could select a bunch of feeds grouped by category by pressing Return, but that no longer works.
Thanks @jman-schief for mentioning the o key. I wasn't aware of that and it works as a replacement. 🙂
And thanks to the whole Miniflux team for this amazing piece of software. I use it every day.

@fguillot
Copy link
Member

This is the consequence of this pull-request that was made to improve accessibility when using screen readers: #2348 CC: @krvpb024

@rluetzner
Copy link

Understood. From the pull request it's clear that this was a conscious decision.
Ultimately I feel like it's more important to improve screen reader support than bring this back, especially because I just need to get used to another key.

The way I understood it, is that the Return key always worked implicitly, because a specific element was selected when navigating between articles or categories. I'm wondering if it would make sense to add an explicit keybinding in addition to o, so the Return key does the same.

I have no idea if anyone besides me might want that, but here are my arguments.

  1. It feels more intuitive. While o is documented in the list of hotkeys, Return is what you can use almost anywhere to select an object.
  2. Pressing o feels uncomfortable. It might just take a while of getting used to, but right now, keeping my index- and middlefinger on j/k and moving my ringfinger to o is way less comfortable than hitting Return with my pinkie.

I can take a look if this can easily be implemented and especially if it doesn't cause any hidden problems. I guess we'd want to keep Return opening hyperlinks inside an article, if they are focused.

@krvpb024
Copy link

I think it's good and reasonable to bring back this behavior, pressing the Return key to open the selected entry. But the focus element is switched from link to article, this must implement by JavaScript. And should mention the Return and o key both can open the selected item in the document, since this is not a native article behavior.

fguillot pushed a commit that referenced this issue Feb 22, 2024
There are a few things that need to be done, to make this work.

First, we need to register `Enter` as another hotkey that opens the
selected item.

However, by default the `KeyboardHandler` will override all default
actions. That might make sense for any other key, but for the `Enter`
key, we want to keep the default behavior (i.e. follow a selected link
or press a button). So for this single key event, we do not call
`preventDefault()`.

I see this as unproblematic for the following reasons.

1. With the changes from #2348, when we're in a list of items (articles,
   categories, feeds), there is no link selected. This is what made the
   `Enter` key work _implicitly_ in the past. With nothing selected, the
   `Enter` key will do nothing by default.
2. If we have **any** link selected (including when we are in a view
   with a list of selectable items), we'll get the default action of
   `Enter` (i.e. follow a link), which is exactly what we had before.

Lastly, we need to update the list of keyboard shortcuts displayed when
pressing `?`.

This fixes #2366.
jeankhawand pushed a commit to jeankhawand/v2 that referenced this issue Mar 20, 2024
There are a few things that need to be done, to make this work.

First, we need to register `Enter` as another hotkey that opens the
selected item.

However, by default the `KeyboardHandler` will override all default
actions. That might make sense for any other key, but for the `Enter`
key, we want to keep the default behavior (i.e. follow a selected link
or press a button). So for this single key event, we do not call
`preventDefault()`.

I see this as unproblematic for the following reasons.

1. With the changes from miniflux#2348, when we're in a list of items (articles,
   categories, feeds), there is no link selected. This is what made the
   `Enter` key work _implicitly_ in the past. With nothing selected, the
   `Enter` key will do nothing by default.
2. If we have **any** link selected (including when we are in a view
   with a list of selectable items), we'll get the default action of
   `Enter` (i.e. follow a link), which is exactly what we had before.

Lastly, we need to update the list of keyboard shortcuts displayed when
pressing `?`.

This fixes miniflux#2366.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug Report
Development

Successfully merging a pull request may close this issue.

4 participants