Skip to content

fix(site/src): add visible labels to the port forward listening port controls - #32383

Merged
jeremyruppel merged 1 commit into
mainfrom
fix/port-forward-visible-label
Nov 18, 2026
Merged

jeremyruppel merged 1 commit into
mainfrom
fix/port-forward-visible-label

Conversation

@chrifro

@chrifro chrifro commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

The listening ports filter in the workspace port forward popover showed only a "Filter ports..." placeholder, which disappears on focus, so the field had no persistent visible label (axe label-is-placeholder, WCAG 3.3.2). This adds visible Protocol and Port labels, tied with htmlFor/id, to the listening port protocol select and the port field.

Both popover sections now have a "Protocol" and a "Port" control, so each section's controls are wrapped in a role="group" labelled by its heading ("Listening ports", "Shared ports"). That way screen readers can tell them apart. SearchField gains an id prop to support the label association.

Fixes DEQ-272

Before After
Decision log
  • Label text. Deque suggested "port number". The field both filters detected ports and connects to a typed port, so the label is Port, which matches the share form's existing Port field. The placeholder stays as an example hint.
  • Protocol label. The protocol select beside the field had only an aria-label. It gets a visible Protocol label too, so both controls in the row look the same.
  • Duplicate names. The frontend deep review flagged that Protocol and Port now appear in both popover sections. Rather than adding section words to the visible labels, each section is a role="group" named by its existing heading.
  • Tests. The Vitest helper and story queries now find the field by its new name inside the "Listening ports" group. They no longer depend on the share form's port field being a spinbutton.
Verification
  • pnpm check, pnpm lint (biome, oxlint, tsc, circular deps, compiler, sentence case, knip): pass.
  • PortForwardButton.test.tsx and the PortForwardPopoverView storybook tests: pass.
  • Full pnpm test: 4 failures in TemplatePermissions.test.tsx and MCPServerForm.test.tsx, which this change doesn't touch. Both files pass when run alone (26/26).
  • pnpm build: pass.
  • Checked on a ./scripts/develop.sh instance with a running workspace: the popover's "Listening ports" group shows visible Protocol and Port labels and exposes them as accessible names.

Generated by Coder Agents on behalf of @chrifro.

…controls

Fixes DEQ-272 (axe label-is-placeholder, WCAG 3.3.2). The listening port
filter field relied on its placeholder as its only visible label.
@linear-code

linear-code Bot commented Nov 18, 2026

Copy link
Copy Markdown

DEQ-272

@chrifro
chrifro requested a review from aqandrew November 18, 2026 12:55
@chrifro
chrifro marked this pull request as ready for review November 18, 2026 12:55

@jeremyruppel jeremyruppel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed at 30088b9. The visible Protocol and Port labels are tied to their controls with htmlFor/id, fixing DEQ-272 (label-is-placeholder, WCAG 3.3.2). The section role="group" wrappers keep the duplicate names distinguishable. Scope, size, required CI, targeted unit/story tests, and Storybook axe checks (no new violations vs. base) all pass. Nits: the size="sm" Connect button now sits 4px lower than the 36px inputs under items-end (PortForwardButton.tsx:381); <fieldset> would be the native alternative to div role="group". Follow-ups filed for pre-existing issues: DEQ-637, DEQ-638, DEQ-639.

🤖 Generated by Coder Agents on behalf of @jeremyruppel.

@jeremyruppel
jeremyruppel merged commit 7809665 into main Nov 18, 2026
56 checks passed
@jeremyruppel
jeremyruppel deleted the fix/port-forward-visible-label branch November 18, 2026 22:16
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 18, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
docs-preview — 30088b97 Deployed Nov 18, 2026 by jeremyruppel via cleanup #232
main — 30088b97 Deployed Nov 18, 2026 by jeremyruppel via cla #259930
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants