Skip to content

fix: allow Enter on public share Download link#62367

Open
kristian-zendato wants to merge 1 commit into
masterfrom
fix/public-download-button-focus
Open

fix: allow Enter on public share Download link#62367
kristian-zendato wants to merge 1 commit into
masterfrom
fix/public-download-button-focus

Conversation

@kristian-zendato

@kristian-zendato kristian-zendato commented Jul 21, 2026

Copy link
Copy Markdown

Summary

On public shares, the header Download control is an <a> that can be focused with the keyboard, but Enter did not start the download.
Cause: each FileEntry registered an Enter hotkey with prevent: true / stop: true. useHotKey always called preventDefault before the callback, so Enter was cancelled even when the row was inactive and did nothing.
Change: only call preventDefault / stopPropagation inside triggerDefaultAction when the row is active. Browser default activation of the Download link works again.
Added a Cypress regression test that focuses Download and presses Enter.

TODO

  • Fix Enter hotkey so it does not block other focused controls
  • Cypress coverage for keyboard download on public share
  • Confirm manual keyboard check on a live public share (Enter on Download)

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@kristian-zendato
kristian-zendato requested review from a team and skjnldsv as code owners July 21, 2026 14:01
@kristian-zendato
kristian-zendato requested review from nfebe and sorbaugh and removed request for a team July 21, 2026 14:01
@susnux susnux added bug 3. to review Waiting for reviews labels Jul 21, 2026
@susnux susnux added this to the Nextcloud 35 milestone Jul 21, 2026
@susnux

susnux commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

/backport to stable34

@susnux

susnux commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

/backport to stable33

@susnux susnux 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.

looks good, but ESLint needs to be resolved

@kristian-zendato
kristian-zendato force-pushed the fix/public-download-button-focus branch 4 times, most recently from 7febb0c to aa61dbf Compare July 21, 2026 15:30
Signed-off-by: Kristian Zendato <kristian.zendato@nextcloud.com>
@kristian-zendato
kristian-zendato force-pushed the fix/public-download-button-focus branch from aa61dbf to 769773c Compare July 21, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[accessibility] public share: cannot use "download" button with keyboard only

4 participants