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
+5 -5
View File
@@ -551,7 +551,7 @@ function WaterFieldInner() {
{/* Headgate selector */}
<div>
<label className="block text-base font-semibold text-stone-700 mb-2">
<label className="block text-base font-semibold text-stone-700 mb-2" htmlFor="fld-tselectheadgate">
{t.selectHeadgate}
</label>
{isHeadgateLocked ? (
@@ -575,7 +575,7 @@ function WaterFieldInner() {
<span className="text-stone-500 text-base font-medium">Loading headgates...</span>
</div>
) : (
<select aria-label="Select"
<select id="fld-tselectheadgate" aria-label="Select"
value={effectiveSelectedHeadgate}
onChange={(e) => setSelectedHeadgate(e.target.value)}
required
@@ -629,7 +629,7 @@ function WaterFieldInner() {
{/* GPS Capture */}
<div>
<label className="block text-base font-semibold text-stone-700 mb-2">
<label className="block text-base font-semibold text-stone-700 mb-2" htmlFor="fld-gps-location">
GPS Location
</label>
<button
@@ -658,7 +658,7 @@ function WaterFieldInner() {
{/* Photo Upload */}
<div>
<label className="block text-base font-semibold text-stone-700 mb-2">
<label className="block text-base font-semibold text-stone-700 mb-2" htmlFor="fld-tphotolabel">
{t.photoLabel}
</label>
{photoPreview ? (
@@ -673,7 +673,7 @@ function WaterFieldInner() {
</button>
</div>
) : (
<label className="flex items-center justify-center w-full rounded-xl border-2 border-dashed border-stone-300 cursor-pointer py-5 text-base font-semibold text-stone-500 hover:border-stone-500 hover:text-stone-700 transition-colors min-h-[80px]">
<label className="flex items-center justify-center w-full rounded-xl border-2 border-dashed border-stone-300 cursor-pointer py-5 text-base font-semibold text-stone-500 hover:border-stone-500 hover:text-stone-700 transition-colors min-h-[80px]" htmlFor="fld--taddphoto">
<span>📷 {t.addPhoto}</span>
<input
type="file"