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:
@@ -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"
|
||||
|
||||
@@ -87,10 +87,10 @@ export default function SegmentEditModal({ initialName = "", initialDescription
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-[var(--admin-text-primary)] mb-1.5">
|
||||
<label className="block text-sm font-medium text-[var(--admin-text-primary)] mb-1.5" htmlFor="fld-description-optional">
|
||||
Description <span className="text-[var(--admin-text-muted)] font-normal">(optional)</span>
|
||||
</label>
|
||||
<textarea aria-label=". Customers Who Pick Up At The Fort Pierce Stop Regularly"
|
||||
<textarea id="fld-description-optional" aria-label=". Customers Who Pick Up At The Fort Pierce Stop Regularly"
|
||||
value={description}
|
||||
onChange={(e) => setDescription(e.target.value)}
|
||||
placeholder="e.g. Customers who pick up at the Fort Pierce stop regularly"
|
||||
|
||||
Reference in New Issue
Block a user