fix(a11y): label associations for AdminPromoGroupCreate + AdminPinnedMessageCreate

Add htmlFor/id pairs for the name + auto-assign inputs (AdminPromoGroupCreate) and the
content textarea (AdminPinnedMessageCreate). AdminPromoOfferSend skipped — its labels
sit above button-groups, not native controls (a separate role=group/radiogroup pass).
This commit is contained in:
c0mrade
2026-05-26 10:39:22 +03:00
parent a635ca2316
commit 5a8195f83f
2 changed files with 6 additions and 3 deletions

View File

@@ -246,10 +246,11 @@ export default function AdminPinnedMessageCreate() {
<div className="card space-y-6"> <div className="card space-y-6">
{/* Message text */} {/* Message text */}
<div> <div>
<label className="mb-2 block text-sm font-medium text-dark-300"> <label htmlFor="pm-content" className="mb-2 block text-sm font-medium text-dark-300">
{t('admin.pinnedMessages.content')} {t('admin.pinnedMessages.content')}
</label> </label>
<textarea <textarea
id="pm-content"
value={content} value={content}
onChange={(e) => setContent(e.target.value)} onChange={(e) => setContent(e.target.value)}
placeholder={t('admin.pinnedMessages.contentPlaceholder')} placeholder={t('admin.pinnedMessages.contentPlaceholder')}

View File

@@ -192,11 +192,12 @@ export default function AdminPromoGroupCreate() {
<div className="card space-y-4"> <div className="card space-y-4">
{/* Name */} {/* Name */}
<div> <div>
<label className="mb-2 block text-sm font-medium text-dark-300"> <label htmlFor="pg-name" className="mb-2 block text-sm font-medium text-dark-300">
{t('admin.promoGroups.form.name')} {t('admin.promoGroups.form.name')}
<span className="text-error-400">*</span> <span className="text-error-400">*</span>
</label> </label>
<input <input
id="pg-name"
type="text" type="text"
value={name} value={name}
onChange={(e) => setName(e.target.value)} onChange={(e) => setName(e.target.value)}
@@ -349,11 +350,12 @@ export default function AdminPromoGroupCreate() {
{/* Auto-assign */} {/* Auto-assign */}
<div> <div>
<label className="mb-2 block text-sm font-medium text-dark-300"> <label htmlFor="pg-auto-assign" className="mb-2 block text-sm font-medium text-dark-300">
{t('admin.promoGroups.form.autoAssign')} {t('admin.promoGroups.form.autoAssign')}
</label> </label>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<input <input
id="pg-auto-assign"
type="number" type="number"
value={autoAssignSpent} value={autoAssignSpent}
onChange={(e) => { onChange={(e) => {