Athou / commafeed

Google Reader inspired self-hosted personal RSS reader.
https://www.commafeed.com
Apache License 2.0
2.73k stars 370 forks source link

Focus trap in feed entry header #1424

Open joeacarstairs opened 3 months ago

joeacarstairs commented 3 months ago

Describe the bug

There's a focus trap in the feed entry header component.

To Reproduce Steps to reproduce the behavior:

  1. Open a CommaFeed client with at least one entry in the feed.
  2. Click on any entry in the feed.
  3. Press TAB repeatedly.

Expected behavior

You eventually escape the feed header.

Actual behaviour

You cycle between four elements indefinitely.

Screenshots

Focus trap

Environment (please complete the following information):

Additional context

Athou commented 3 months ago

I have to admit I never used the tab key, there are a lot of keyboard shortcuts to navigate between entries. I can reproduce the issue but I don't know why it happens. It stops if I make either the header or the star and open link icons unfocusable (tabindex=-1), but I don't know if this is acceptable. May I ask how you use the tab key to navigate CommaFeed?

joeacarstairs commented 3 months ago

I was also puzzled as to why this happens! I thought it was better to write it down anyway.

As for how I'm using CommaFeed: I like to go through a feed by marking each item as 'read' in sequence. I usually do this with the mouse, but I would prefer to do it with the keyboard. I know that the universal way to move between focusable elements in sequence on webpages is using the TAB key, so that's what I tried. Hope that's helpful