polish: tighten Policy Editor interaction states, copy, and a11y (#936)#1256
Open
T-kesh wants to merge 1 commit into
Open
polish: tighten Policy Editor interaction states, copy, and a11y (#936)#1256T-kesh wants to merge 1 commit into
T-kesh wants to merge 1 commit into
Conversation
Author
|
@kryputh I apologize for the late pr. Trust you're doing much better now? |
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.
Summary
Polish-pass on the existing Policy Editor surface. Closes #936.
No new tools, modules, or dependencies introduced — all changes stay within
the three paths scoped by the issue.
Files changed
src/routes/policy-editor/route.tsxsrc/features/settings/mailbox-policy-templates.tssrc/components/mail/SettingsModal.tsxWhat changed
route.tsx— Policy Editor pagerole="switch",aria-checked,aria-label,aria-disabled. Contextualhelper text changes when a control is gated (e.g. "Enable unknown senders first to configure
verification.") instead of only going grey.
active:scale-95and an emerald focus ring added.Loader2spinner alongside "Saving…" while the requestis in-flight.
disabledprevents double-submit.focus-visible:ring-2 focus-visible:ring-emerald-400applied. Live value usestabular-nums.ShieldAlerticon withAlertCircle+ a "Save failed" headingand body. Added
role="alert"+aria-live="polite"so screen readers announce failures.role="list"/role="listitem"and iconaria-labels.mailbox-policy-templates.ts— Template copyRewrote all five
tradeoffandsenderExperiencestrings to be sharper and consistent with theStealth Mail safety/sender-control positioning:
SettingsModal.tsx— Inbox control tabSettingsToggle— Active state now usesbg-emerald-500(wasbg-white/20). Off state usesbg-white/15. Thumb transitions viatransition-[left]. Focus ring offset set toring-offset-background.aria-labelledby/aria-describedbywired to existing label elements.PostageInput(extracted from inline<label>) — Stateful focus ring: emerald when focused,rose when invalid.
aria-invalid,aria-describedbypointing to a hint line below the fieldthat changes to a validation message on bad input.
hover:border-white/15andactive:scale-[0.99]. Focus ring standardised.AlertTriangleicon. Heading updated to "Applying willoverwrite your current draft" with clearer body copy.
previewMatchesCurrentis true.aria-labelreflects each state.policy fields below, then click Save as custom to store this draft."
you apply. Save or cancel to keep or discard."
focus-visible:ring-2 focus-visible:ring-emerald-400 outline-noneadded.Behaviour preserved
getByRole("button", { name: "Verified only" }), decimal input, Save changesbutton) continue to resolve without modification.
Validation
npm run test(54 files, 598 tests)npm run linttools/v2/are out of scope)npx prettier --write