Repository navigation
fix(web): give the Edit Metadata lock toggle a 24px target and a focus ring gap - #5609
Merged
Quick104 merged 1 commit intoNov 30, 2026
Merged
Conversation
…s ring gap The padlock beside each field label was about 12x12 px unlocked, under the 24 px minimum target, and the browser outline sat on the icon. Pad it to a 24 px box with negative margins so the label row and the icon's position stay the same, and draw the shared focus ring around the padded box. On touch screens the hit area also reaches 44 px wide and into the space above the label, but not down into the field.
Contributor
|
Warning Review limit reachedThis organization requires a seat for paid usage-based reviews, including automatic and on-demand reviews. Ask an admin to assign a seat or enable paid usage-based reviews for users without a seat in Billing. Next included review available in 59 minutes. View limit details
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
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.
Problem
Closes #4779
Related issue: N/A
Validation tasks: #1211 C1, C2 (field locks in the Edit Metadata dialog; toggling and saving locks still works)
Other clients: N/A (web only; Apple, Android and Roku have no metadata lock toggle)
The padlock beside each field label in the web Edit Metadata dialog was too small to hit: 12×12 px unlocked and 49×15 px locked, under the 24×24 px minimum (WCAG 2.5.8). On a phone it sits just above the text field, so a missed tap lands in the field. Its keyboard focus outline also sat directly on the icon and touched the "locked" label.
The toggle is now at least 24×24 px, with the focus ring drawn around its padding instead of on the icon. On touch screens the hit area also extends to 44 px wide and 34 px tall. The icon stays in the same place, flush with the field's end edge, and the fields do not move.
Approach
The button gets padding to a 24 px box, with negative margins that cancel the padding so the label row stays 18 px tall and the icon keeps its position. Focus uses the same
ring-[3px] ring-ring/50style as the sharedButton. In forced-colors mode the existing:focus-visibleoutline rule inapp.cssstill applies.On a primary coarse pointer, an invisible
::afterextends the hit area toward the label and up into the 16 px gap above the row. It stops at the bottom of the button, so it never covers the input below. That limits the touch height to 34 px. Reaching 44 px would mean covering the top of this field's input or the bottom of the field above. A touchscreen laptop whose primary pointer is a mouse or trackpad gets the 24 px target.Validation
mainwith a synthetic series and movie, at 1440 px and at 390 px with touch emulation, in headless Chromium. Measured the toggles' boxes and hit-tested taps around the icon. Before: 12×12 / 49×15, and taps 8 px from the icon centre missed. After: 24×24 / 61×24. On touch, taps 18 px toward the label and 14 px above the icon centre hit the toggle, and a tap 16 px below still reaches the field.make test-webpass. No test added: the change is styling that jsdom cannot measure. No Go code changed.Evidence: https://evidence.siloserver.org/r/silo-server/pr-5609/
Evidence
Before and after captures of the dialog and of the keyboard focus ring, desktop and phone, are on the evidence page linked under Validation.
Risks
None identified. In forced-colors mode, the outline (2 px with a 2 px offset) now reaches the top border of the input 3 px below the button. Focus is still clearly visible.
Checklist
AI Disclosure
content-['']class, which is removed.