فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

fix(a11y): label uncovered financial controls (InvoiceFormView.js)

davoodmehraban89 committed Oct 31, 2026 at 00:29 UTC e4715a23b36c1f77c15f245fa6df8fc770f24dd5
1 file changed +10 -10
src/views/InvoiceFormView.js
+10 -10
@@ -199,11 +199,11 @@ class InvoiceFormViewImpl {
199
200 <div style="display:flex;gap:8px;align-items:center;margin-bottom:10px">
201 <span style="flex:1;font-size:12.5px">تخفیف کلی</span>
202 - <select class="form-control" id="invDiscType" style="width:80px;min-height:34px" onchange="window.InvoiceFormView._onDiscTypeChange()">
202 + <select class="form-control" id="invDiscType" aria-label="نوع تخفیف کل فاکتور" style="width:80px;min-height:34px" onchange="window.InvoiceFormView._onDiscTypeChange()">
203 <option value="fixed" ${d.discountType === 'fixed' ? 'selected' : ''}>مبلغ</option>
204 <option value="percent" ${d.discountType === 'percent' ? 'selected' : ''}>درصد</option>
205 </select>
206 - <input type="text" inputmode="numeric" class="form-control" id="invDiscInput" style="width:110px;min-height:34px" value="${NumberInput.format(d.discountInput || 0)}" oninput="window.InvoiceFormView._recalc()" />
206 + <input type="text" inputmode="numeric" class="form-control" id="invDiscInput" aria-label="مقدار تخفیف کل فاکتور" style="width:110px;min-height:34px" value="${NumberInput.format(d.discountInput || 0)}" oninput="window.InvoiceFormView._recalc()" />
207 </div>
208
209 <div id="vatRow" style="display:${d.kind === 'non_formal' ? 'none' : 'flex'};gap:8px;align-items:center;margin-bottom:10px">
@@ -211,13 +211,13 @@ class InvoiceFormViewImpl {
211 <input type="checkbox" id="invVatEnabled" ${d.vatEnabled ? 'checked' : ''} onchange="window.InvoiceFormView._recalc()" />
212 مالیات ارزش افزوده
213 </label>
214 - <input type="text" inputmode="numeric" class="form-control" id="invVatRate" style="width:80px;min-height:34px" value="${NumberInput.format(d.vatRate || 10)}" oninput="window.InvoiceFormView._recalc()" />
214 + <input type="text" inputmode="numeric" class="form-control" id="invVatRate" aria-label="درصد مالیات بر ارزش افزوده" style="width:80px;min-height:34px" value="${NumberInput.format(d.vatRate || 10)}" oninput="window.InvoiceFormView._recalc()" />
215 <span style="font-size:12.5px;color:var(--text-muted)">٪</span>
216 </div>
217
218 <div style="display:flex;gap:8px;align-items:center;margin-bottom:10px">
219 <span style="flex:1;font-size:12.5px">روش پرداخت</span>
220 - <select class="form-control" id="invPayment" style="min-height:34px" onchange="window.InvoiceFormView._onPaymentChange()">
220 + <select class="form-control" id="invPayment" aria-label="وضعیت پرداخت فاکتور" style="min-height:34px" onchange="window.InvoiceFormView._onPaymentChange()">
221 <option value="cash" ${d.paymentMethod === 'cash' ? 'selected' : ''}>نقدی</option>
222 <option value="credit" ${d.paymentMethod === 'credit' ? 'selected' : ''}>نسیه</option>
223 <option value="partial" ${d.paymentMethod === 'partial' ? 'selected' : ''}>پرداخت جزئی</option>
@@ -298,17 +298,17 @@ class InvoiceFormViewImpl {
298 <td>
299 <div style="position:relative;min-width:190px">
300 <input type="hidden" class="row-product" value="${this._esc(item.productId || '')}" />
301 - <input type="text" class="form-control row-product-search" autocomplete="off" value="${this._esc(selectedProductLabel)}" placeholder="جستجوی کالا یا کد" onfocus="window.InvoiceFormView._showProductOptions(${idx})" oninput="window.InvoiceFormView._showProductOptions(${idx}, true)" />
301 + <input type="text" class="form-control row-product-search" aria-label="جستجوی کالای ردیف فاکتور" autocomplete="off" value="${this._esc(selectedProductLabel)}" placeholder="جستجوی کالا یا کد" onfocus="window.InvoiceFormView._showProductOptions(${idx})" oninput="window.InvoiceFormView._showProductOptions(${idx}, true)" />
302 <div class="row-product-options" style="display:none;position:absolute;z-index:10010;top:100%;right:0;left:0;max-height:220px;overflow:auto;background:var(--card-bg,#fff);border:1px solid var(--border);border-radius:8px;box-shadow:0 8px 20px #0002"></div>
303 </div>
304 </td>
305 - <td><input type="text" class="form-control row-unit" style="min-height:36px;text-align:center" value="${this._esc(item.unit)}" oninput="window.InvoiceFormView._onFieldChange(${idx}, 'unit', this.value)" /></td>
306 - <td><input type="text" inputmode="numeric" class="form-control row-qty" style="min-height:36px;text-align:center" value="${NumberInput.format(item.qty)}" oninput="window.InvoiceFormView._onFieldChange(${idx}, 'qty', this.value)" /></td>
307 - <td><input type="text" inputmode="numeric" class="form-control row-price" style="min-height:36px;text-align:left" value="${NumberInput.format(item.price)}" oninput="window.InvoiceFormView._onFieldChange(${idx}, 'price', this.value)" /></td>
305 + <td><input type="text" class="form-control row-unit" aria-label="واحد کالای ردیف" style="min-height:36px;text-align:center" value="${this._esc(item.unit)}" oninput="window.InvoiceFormView._onFieldChange(${idx}, 'unit', this.value)" /></td>
306 + <td><input type="text" inputmode="numeric" class="form-control row-qty" aria-label="تعداد ردیف فاکتور" style="min-height:36px;text-align:center" value="${NumberInput.format(item.qty)}" oninput="window.InvoiceFormView._onFieldChange(${idx}, 'qty', this.value)" /></td>
307 + <td><input type="text" inputmode="numeric" class="form-control row-price" aria-label="قیمت واحد ردیف فاکتور" style="min-height:36px;text-align:left" value="${NumberInput.format(item.price)}" oninput="window.InvoiceFormView._onFieldChange(${idx}, 'price', this.value)" /></td>
308 <td>
309 <div style="display:flex;gap:4px">
310 - <input type="text" inputmode="numeric" class="form-control row-disc" style="min-height:36px;text-align:left;flex:1" value="${NumberInput.format(item.discountType === 'percent' ? (item.discountInput || 0) : (item.discount || 0))}" oninput="window.InvoiceFormView._onFieldChange(${idx}, 'discount', this.value)" />
311 - <select class="form-control" style="min-height:36px;width:60px;padding:0 6px;text-align:center;font-size:12px" onchange="window.InvoiceFormView._onDiscTypeRowChange(${idx}, this.value)">
310 + <input type="text" inputmode="numeric" class="form-control row-disc" aria-label="تخفیف ردیف فاکتور" style="min-height:36px;text-align:left;flex:1" value="${NumberInput.format(item.discountType === 'percent' ? (item.discountInput || 0) : (item.discount || 0))}" oninput="window.InvoiceFormView._onFieldChange(${idx}, 'discount', this.value)" />
311 + <select class="form-control" style="min-height:36px;width:60px;padding:0 6px;text-align:center;font-size:12px" aria-label="نوع تخفیف ردیف" onchange="window.InvoiceFormView._onDiscTypeRowChange(${idx}, this.value)">
312 <option value="fixed" ${item.discountType === 'fixed' ? 'selected' : ''}>مبلغ</option>
313 <option value="percent" ${item.discountType === 'percent' ? 'selected' : ''}>٪</option>
314 </select>