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">
{/* Message text */}
<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')}
</label>
<textarea
id="pm-content"
value={content}
onChange={(e) => setContent(e.target.value)}
placeholder={t('admin.pinnedMessages.contentPlaceholder')}

View File

@@ -192,11 +192,12 @@ export default function AdminPromoGroupCreate() {
<div className="card space-y-4">
{/* Name */}
<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')}
<span className="text-error-400">*</span>
</label>
<input
id="pg-name"
type="text"
value={name}
onChange={(e) => setName(e.target.value)}
@@ -349,11 +350,12 @@ export default function AdminPromoGroupCreate() {
{/* Auto-assign */}
<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')}
</label>
<div className="flex items-center gap-2">
<input
id="pg-auto-assign"
type="number"
value={autoAssignSpent}
onChange={(e) => {