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:
@@ -184,9 +184,9 @@ export default function LotCreateForm({ brandId }: { brandId: string }) {
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-xs font-medium text-stone-600 mb-1.5">Yield Est.</label>
|
||||
<label className="block text-xs font-medium text-stone-600 mb-1.5" htmlFor="fld-yield-est">Yield Est.</label>
|
||||
<div className="flex rounded-xl border border-stone-200 bg-stone-50 overflow-hidden focus-within:border-emerald-600 focus-within:bg-white transition-colors">
|
||||
<input aria-label=". 5000"
|
||||
<input id="fld-yield-est" aria-label=". 5000"
|
||||
type="number"
|
||||
value={yield_estimate_lbs}
|
||||
onChange={(e) => setYieldEstimateLbs(e.target.value)}
|
||||
|
||||
@@ -277,9 +277,9 @@ export default function LotCreateModal({ isOpen, onClose, brandId }: Props) {
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label className="block text-xs font-medium mb-1.5" style={{ color: "var(--admin-text-primary)" }}>Yield Est.</label>
|
||||
<label className="block text-xs font-medium mb-1.5" style={{ color: "var(--admin-text-primary)" }} htmlFor="fld-yield-est">Yield Est.</label>
|
||||
<div className="flex rounded-xl border overflow-hidden transition-colors" style={{ borderColor: "var(--admin-border)", backgroundColor: "var(--admin-bg-subtle)" }}>
|
||||
<input aria-label=". 5000"
|
||||
<input id="fld-yield-est" aria-label=". 5000"
|
||||
type="number"
|
||||
value={yield_estimate_lbs}
|
||||
onChange={(e) => setYieldEstimateLbs(e.target.value)}
|
||||
|
||||
@@ -79,10 +79,10 @@ export default function QuickNewLotModal({ brandId, onCreated, onClose }: Props)
|
||||
)}
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-stone-700 mb-1.5">
|
||||
<label className="block text-sm font-medium text-stone-700 mb-1.5" htmlFor="fld-crop-type-">
|
||||
Crop Type <span className="text-red-500">*</span>
|
||||
</label>
|
||||
<input aria-label=". Sweet Corn"
|
||||
<input id="fld-crop-type-" aria-label=". Sweet Corn"
|
||||
type="text"
|
||||
value={crop_type}
|
||||
onChange={(e) => setCropType(e.target.value)}
|
||||
|
||||
Reference in New Issue
Block a user