fix: focus article view when item selected via keyboard navigation#3791
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves keyboard navigation accessibility by programmatically moving focus into the article details pane when the selected item changes via keyboard navigation, enabling immediate scrolling with arrow keys/PageUp/PageDown without extra shortcuts.
Changes:
- Add a
selectedByKeyboardsignal fromContentTemplatetoFeedItemDisplayto trigger focusing the article pane on keyboard-driven selection changes. - Update
FeedItemDisplayto focus either the title link (screen reader mode) or the article container (keyboard navigation), and addtabindexto allow programmatic focusing. - Extend unit tests for the new focus behavior and add a changelog entry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/javascript/unit/components/feed-display/FeedItemDisplay.spec.ts |
Updates watcher invocation and adds tests for focusing the article pane when selection happens via keyboard navigation. |
src/components/feed-display/FeedItemDisplay.vue |
Introduces selectedByKeyboard prop, focuses the article container on keyboard selection, and adds tabindex/styles to support focusing. |
src/components/ContentTemplate.vue |
Tracks when selection changes come from keyboard navigation and passes that state down to the details component. |
CHANGELOG.md |
Documents the keyboard-focus behavior change under Unreleased fixes. |
Signed-off-by: Wolfgang <github@linux-dude.de>
f1db40e to
e46d603
Compare
Grotax
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR programmatically focus the article view when select an item via keyboard navigation, similar to setting the focus on the article title link in screen reader mode.
This allows keyboard users to instantly scroll long articles with the arrow keys or PgDown/Up.
Since the Nextcloud shortcuts are focus independent, I think there is no need for extra shortcuts to switch focus manually for keyboard users.
Checklist