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:
@@ -515,7 +515,7 @@ export function TemplateEditForm({
|
||||
<div className="rounded-xl border border-[var(--admin-border)] bg-white p-4 sm:p-6 space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<h3 className="text-xs sm:text-sm font-semibold text-[var(--admin-text-muted)] uppercase tracking-wide">Message Body</h3>
|
||||
<label className="flex items-center gap-2 text-xs sm:text-sm">
|
||||
<label className="flex items-center gap-2 text-xs sm:text-sm" htmlFor="fld-sethtmlmodeetargetchecked-classnameround">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={htmlMode}
|
||||
@@ -555,7 +555,7 @@ export function TemplateEditForm({
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-xs sm:text-sm font-medium text-[var(--admin-text-primary)] mb-1.5">Plain Text Fallback *</label>
|
||||
<label className="block text-xs sm:text-sm font-medium text-[var(--admin-text-primary)] mb-1.5" htmlFor="fld-plain-text-fallback-">Plain Text Fallback *</label>
|
||||
<textarea aria-label="Plain Text Version..."
|
||||
id="body-textarea"
|
||||
value={bodyText}
|
||||
@@ -568,7 +568,7 @@ export function TemplateEditForm({
|
||||
</>
|
||||
) : (
|
||||
<div>
|
||||
<label className="block text-xs sm:text-sm font-medium text-[var(--admin-text-primary)] mb-1.5">Body (Plain Text) *</label>
|
||||
<label className="block text-xs sm:text-sm font-medium text-[var(--admin-text-primary)] mb-1.5" htmlFor="fld-body-plain-text-">Body (Plain Text) *</label>
|
||||
<textarea aria-label="Message Body With Variables Like {{first Name}}..."
|
||||
id="body-textarea"
|
||||
value={bodyText}
|
||||
|
||||
Reference in New Issue
Block a user