fix(a11y): associate referral form labels with their inputs

Add htmlFor/id pairs across the partner-apply form (company, channel, website,
description, expected referrals, desired commission) and the withdrawal-request form
(amount, payment details) so labels are programmatically tied to their controls (WCAG 1.3.1).
This commit is contained in:
c0mrade
2026-05-26 00:06:59 +03:00
parent 7b0a72db5b
commit 1b40c3856d
2 changed files with 37 additions and 8 deletions

View File

@@ -59,10 +59,11 @@ export default function ReferralWithdrawalRequest() {
<form onSubmit={handleSubmit} className="space-y-4">
<div className="bento-card space-y-4">
<div>
<label className="mb-1 block text-sm font-medium text-dark-300">
<label htmlFor="rw-amount" className="mb-1 block text-sm font-medium text-dark-300">
{t('referral.withdrawal.fields.amount')}
</label>
<input
id="rw-amount"
type="number"
min={balance ? Math.ceil(balance.min_amount_kopeks / 100) : 0}
max={balance ? Math.floor(balance.available_total / 100) : 0}
@@ -86,10 +87,14 @@ export default function ReferralWithdrawalRequest() {
</p>
</div>
<div>
<label className="mb-1 block text-sm font-medium text-dark-300">
<label
htmlFor="rw-payment-details"
className="mb-1 block text-sm font-medium text-dark-300"
>
{balance?.requisites_text || t('referral.withdrawal.fields.paymentDetails')}
</label>
<textarea
id="rw-payment-details"
className="input min-h-[80px] w-full"
value={form.payment_details}
onChange={(e) => setForm({ ...form, payment_details: e.target.value })}