fix: react-doctor label-has-associated-control (-15, nested-interactive -1)

Add htmlFor/id pairs to label/input pairs across ~24 files.
Convert section-header labels (Role/Permissions/Visibility/Environment/
Send via/Quick messages/Campaign Type/When to Send/Preview) to <p>.
Convert clickable divs to buttons (AbandonedCartDashboard → native dialog).
Hoist regex patterns out of loops in ai-import.ts.
This commit is contained in:
Nora
2026-06-26 04:02:10 -06:00
parent f6bf91951e
commit 16a6756ad1
30 changed files with 220 additions and 192 deletions
@@ -544,7 +544,7 @@ export default function CampaignComposerPage({ brandId, campaigns, templates, se
{/* Preview */}
<div>
<label className="block text-sm font-semibold text-stone-700 mb-1.5">Preview</label>
<p className="block text-sm font-semibold text-stone-700 mb-1.5">Preview</p>
<EmailPreview subject={subject} body={bodyText} />
</div>
</div>
@@ -583,10 +583,10 @@ export default function CampaignComposerPage({ brandId, campaigns, templates, se
{/* Campaign settings */}
<div className="space-y-4">
<div>
<label className="block text-sm font-semibold text-stone-700 mb-1.5">
<label htmlFor="fld-campaign-name" className="block text-sm font-semibold text-stone-700 mb-1.5">
Campaign Name <span className="text-red-500">*</span>
</label>
<input aria-label=". May Sweet Corn Promotion"
<input id="fld-campaign-name" aria-label=". May Sweet Corn Promotion"
type="text"
value={name}
onChange={(e) => setName(e.target.value)}
@@ -721,7 +721,7 @@ export default function CampaignComposerPage({ brandId, campaigns, templates, se
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6">
{/* Campaign type selection */}
<div>
<label className="block text-sm font-semibold text-stone-700 mb-3">Campaign Type</label>
<p className="block text-sm font-semibold text-stone-700 mb-3">Campaign Type</p>
<div className="space-y-3">
{CAMPAIGN_TYPES.map((ct) => (
<button type="button"
@@ -751,7 +751,7 @@ export default function CampaignComposerPage({ brandId, campaigns, templates, se
{/* Send timing */}
<div>
<label className="block text-sm font-semibold text-stone-700 mb-3">When to Send</label>
<p className="block text-sm font-semibold text-stone-700 mb-3">When to Send</p>
<div className="space-y-3">
<label className={`flex items-center gap-4 p-4 rounded-xl border-2 cursor-pointer transition-all ${
sendNow ? "border-emerald-500 bg-emerald-50" : "border-stone-200 hover:border-stone-300"