Files
coder/site
Andrew Aquino 727b8c0e22 fix(site/src/pages): add visible labels to the sharing and permissions form fields (#32773)
Adds a visible label above the fields that only had placeholder text,
from the "Form fields" heading of @chrifro's audit on #32360:
https://github.com/coder/coder/pull/32360#issuecomment-7165745767

- **Template permissions:** visible "User or group" and "Role" labels
above the add form's fields.
- **ChatSharingPopover:** a visible "User or group" label above the
autocomplete.
- **ProjectAccessDialog:** the `sr-only` "User or group" label is now
visible, and the role select gets a visible "Role" label linked with
`htmlFor`.
- The autocomplete triggers use `aria-labelledby="{labelId}
{triggerId}"`, so the name is the label followed by the current
selection or placeholder.

<details>
<summary>Decision log</summary>

- Used `Label` with `useId()` inline instead of
`FormField`/`SelectField`, because those need formik helpers that these
forms don't use.
- Rows align with `items-end` (`sm:items-end` in the dialogs) so the
triggers and the submit button line up under the new labels.
- The template `UserOrGroupAutocomplete` now takes required `id` and
`triggerAriaLabelledBy` props, replacing a hard-coded id.
- Dropped a presence-only story `play` per FE1; the visual change is
covered by the existing stories' screenshots.
- Out of scope: other sharing dialogs under `AISettingsPage` still use
placeholder-only labels.
</details>

🤖 Generated by Coder Agents on behalf of @aqandrew.
2026-12-01 11:51:43 -08:00
..
…
…
…
…
…
…