fix: prevent file upload input from receiving keyboard tab focus - #2138
Open
kristian-zendato wants to merge 1 commit into
Open
fix: prevent file upload input from receiving keyboard tab focus#2138kristian-zendato wants to merge 1 commit into
kristian-zendato wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2138 +/- ##
=======================================
Coverage 36.30% 36.30%
=======================================
Files 17 17
Lines 774 774
Branches 145 145
=======================================
Hits 281 281
Misses 480 480
Partials 13 13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sorbaugh
approved these changes
Jul 27, 2026
susnux
reviewed
Jul 27, 2026
| :accept="accept?.join?.(', ')" | ||
| :multiple="multiple" | ||
| class="hidden-visually" | ||
| class="hidden" |
Contributor
There was a problem hiding this comment.
Where does this come from? hidden-visually is a server provided public CSS class, but hidden?
Sounds more like the proper fix would be
Suggested change
| class="hidden" | |
| class="hidden-visually" | |
| tabindex="-1" | |
| aria-hidden="true" |
Contributor
There was a problem hiding this comment.
Ah its also defined in server, but the specificity is pretty low so testing did not work.
I still think it makes sense to mark this properly as hidden from the accessibility tree and remove tab sequence explicitly.
Signed-off-by: Kristian Zendato <kristian.zendato@nextcloud.com>
kristian-zendato
force-pushed
the
fix/file-upload-tab-focus
branch
from
July 27, 2026 16:36
cb926cf to
6345e56
Compare
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.
Related issue: nextcloud/server#62248
Summary
This PR updates the file upload input to prevent it from receiving keyboard focus through the
Tabkey.Changes
Update the class of the file input from
hidden-visuallytohidden.Reason
Using
display: noneensures the element is excluded from the tab order, preventing users from navigating to a non-interactive control while preserving the existing file upload behavior.🤖 AI (if applicable)