Skip to content

fix(web): give the Edit Metadata lock toggle a 24px target and a focus ring gap - #5609

Merged
Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/4779-edit-metadata-lock-target
Nov 30, 2026
Merged

Quick104 merged 1 commit into
Silo-Server:mainfrom
Rhainland:fix/4779-edit-metadata-lock-target

Conversation

@Rhainland

@Rhainland Rhainland commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

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/50 style as the shared Button. In forced-colors mode the existing :focus-visible outline rule in app.css still applies.

On a primary coarse pointer, an invisible ::after extends 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

  • Reproduced on a local build of main with 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.
  • Label row height, field positions and icon positions are identical before and after, for both series and movie, at both widths. The dialog's content area does not scroll horizontally.
  • Clicking a padlock still locks its field (verified on Original Title at both widths).
  • Web lint, format check, typecheck, production build, bundle budget and make test-web pass. 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

  • I read and can explain the complete diff.
  • This pull request addresses one concern.
  • Each test this pull request adds meets "Decide what to test" in CONTRIBUTING.md.
  • The Evidence section shows every change a user can see, or how I checked a change nobody sees.

AI Disclosure

  • Harness: Claude Code (via T3 Code); Codex CLI for code review
  • Tool(s): Claude Code, Codex CLI, GitHub CLI, Playwright (headless Chromium)
  • Model(s): claude-opus-5-5; gpt-6.2-sol (code review)
  • Involvement: Fully AI-generated, human verified
  • Adversarial review: two rounds of independent review of the full diff by gpt-6.2-sol (Codex CLI) and claude-opus-5-5, on correctness, repository standards and the issue's requirements. Round 1: both flagged the missing 44 pt touch target, which is now added. Sol also noted that the forced-colors outline reaches the input border; it is left as is because focus stays visible (see Risks). Round 2: no correctness findings. Both noted that the touch height stops at 34 px and that only the primary pointer is checked; both are explained under Approach. Opus flagged a redundant content-[''] class, which is removed.

…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.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

This 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.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1f862d40-e968-4773-b8af-32a8074aa995
Commits

Reviewing files that changed from the base of the PR and between 5d0006f and b384dc2.

Files selected for processing: 1

  • web/src/components/EditMetadataDialog.tsx
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@silo-kody

silo-kody Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

Silo Kody — review complete

Review finished. Check the inline comments for findings and verify each suggestion against the code and tests.

Reviewing changes in Silo
  • Include the related issue, expected behavior, and validation steps in the PR description.
  • For API changes, describe the effect on Apple and Android clients and Jellyfin compatibility.
  • For plugin changes, identify the affected SDK contract, plugin, and catalog entry.
  • Follow this repository's AGENTS.md and CONTRIBUTING.md.
  • Request another review with @kody start-review in a PR comment.
  • React with 👍 or 👎 to give feedback on individual suggestions.
Review settings
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ❌

@silo-triage silo-triage Bot added the size/S 0–49 added + deleted lines (all files); change volume, not priority. label Nov 29, 2026
@silo-triage silo-triage Bot added bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish labels Nov 29, 2026
@Quick104
Quick104 merged commit a44139c into Silo-Server:main Nov 30, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working impact: polish Annoyance, cosmetic, or nice-to-have priority: P2 Limited scope, workaround exists, or polish size/S 0–49 added + deleted lines (all files); change volume, not priority.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit Metadata lock toggle is too small to tap and its focus ring crowds the icon

2 participants