Skip to content

fix: focus article view when item selected via keyboard navigation#3791

Merged
Grotax merged 1 commit into
nextcloud:masterfrom
wofferl:feat_focus_details
Jun 9, 2026
Merged

fix: focus article view when item selected via keyboard navigation#3791
Grotax merged 1 commit into
nextcloud:masterfrom
wofferl:feat_focus_details

Conversation

@wofferl

@wofferl wofferl commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

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

@wofferl wofferl added 3. to review frontend impact Javascript/Frontend code labels Jun 8, 2026
@wofferl wofferl requested a review from Copilot June 8, 2026 18:06
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/components/feed-display/FeedItemDisplay.vue 88.88% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 selectedByKeyboard signal from ContentTemplate to FeedItemDisplay to trigger focusing the article pane on keyboard-driven selection changes.
  • Update FeedItemDisplay to focus either the title link (screen reader mode) or the article container (keyboard navigation), and add tabindex to 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.

Comment thread src/components/feed-display/FeedItemDisplay.vue
Comment thread src/components/feed-display/FeedItemDisplay.vue
Signed-off-by: Wolfgang <github@linux-dude.de>
@wofferl wofferl force-pushed the feat_focus_details branch from f1db40e to e46d603 Compare June 8, 2026 19:58
@Grotax Grotax merged commit b02a4a7 into nextcloud:master Jun 9, 2026
28 checks passed
Grotax added a commit that referenced this pull request Jun 9, 2026
Added
- Added support for Nextcloud Server 34 "Hub 26 spring" (#3786)

Fixed
- Focus article view when item selected via keyboard navigation (#3791)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Grotax added a commit that referenced this pull request Jun 9, 2026
Added
- Added support for Nextcloud Server 34 "Hub 26 spring" (#3786)

Fixed
- Focus article view when item selected via keyboard navigation (#3791)

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review frontend impact Javascript/Frontend code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants