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

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

davoodmehraban89 committed Oct 31, 2026 at 00:29 UTC 38e39147d4a9166f32fbb1715fbc4b8fbd80ce74
1 file changed +8 -8
src/views/AccountingView.js
+8 -8
@@ -255,7 +255,7 @@ class AccountingViewImpl {
255 const rows = result.rows.map(r => `<tr><td>${html(r.code)}</td><td>${html(r.name)}</td>
256 <td>${Formatters.number(r.debit)}</td><td>${Formatters.number(r.credit)}</td><td>${Formatters.number(r.balance)}</td></tr>`).join('');
257 return `<div class="card"><div class="toolbar"><strong>تراز آزمایشی اسناد قطعی</strong>
258 - <select class="form-control" style="max-width:210px" onchange="window.AccountingView.setTrialPeriod(this.value)">${opts}</select></div>
258 + <select class="form-control" style="max-width:210px" aria-label="دوره تراز آزمایشی" onchange="window.AccountingView.setTrialPeriod(this.value)">${opts}</select></div>
259 <div class="table-wrap"><table><thead><tr><th>کد</th><th>حساب</th><th>گردش بدهکار</th><th>گردش بستانکار</th><th>مانده بدهکار - بستانکار</th></tr></thead>
260 <tbody>${rows || '<tr><td colspan="5">گردشی وجود ندارد.</td></tr>'}</tbody>
261 <tfoot><tr><th colspan="2">جمع</th><th>${Formatters.number(result.totals.debit)}</th><th>${Formatters.number(result.totals.credit)}</th><th>۰</th></tr></tfoot>
@@ -440,10 +440,10 @@ class AccountingViewImpl {
440 }
441 journalRow(line = {}) {
442 return `<tr class="ac-journal-line">
443 - <td><select class="form-control ac-line-account">${this.accountOptions(line.accountId)}</select></td>
444 - <td><input class="form-control ac-line-debit" inputmode="text" placeholder="۰" value="${html(line.debit ?? '0')}"></td>
445 - <td><input class="form-control ac-line-credit" inputmode="text" placeholder="۰" value="${html(line.credit ?? '0')}"></td>
446 - <td><input class="form-control ac-line-note" value="${html(line.description || '')}"></td>
443 + <td><select class="form-control ac-line-account" aria-label="حساب ردیف سند">${this.accountOptions(line.accountId)}</select></td>
444 + <td><input class="form-control ac-line-debit" aria-label="مبلغ بدهکار ردیف" inputmode="text" placeholder="۰" value="${html(line.debit ?? '0')}"></td>
445 + <td><input class="form-control ac-line-credit" aria-label="مبلغ بستانکار ردیف" inputmode="text" placeholder="۰" value="${html(line.credit ?? '0')}"></td>
446 + <td><input class="form-control ac-line-note" aria-label="شرح ردیف سند" value="${html(line.description || '')}"></td>
447 <td><button class="btn btn-secondary" onclick="this.closest('tr').remove()">حذف</button></td>
448 </tr>`;
449 }
@@ -594,7 +594,7 @@ class AccountingViewImpl {
594 }
595 openWarehouse() {
596 Modal.open({title:'ایجاد انبار',size:'sm',closeOnBackdrop:false,
597 - body:'<label class="form-label">نام انبار</label><input id="acWhName" class="form-control">',
597 + body:'<label class="form-label" for="acWhName">نام انبار</label><input id="acWhName" class="form-control">',
598 footer:'<button class="btn btn-secondary" onclick="FINORA.Modal.close()">انصراف</button><button class="btn" onclick="window.AccountingView.saveWarehouse()">ثبت انبار</button>'});
599 }
600 async saveWarehouse() {
@@ -636,8 +636,8 @@ class AccountingViewImpl {
636 const warehouses=await Retail.warehouses();
637 const options=warehouses.map(w=>`<option value="${html(w.id)}">${html(w.name)}</option>`).join('');
638 Modal.open({title:'شروع شمارش انبار',size:'sm',closeOnBackdrop:false,
639 - body:`<label class="form-label">انبار</label><select class="form-control" id="acStWarehouse">${options}</select>
640 - <label class="form-label">تاریخ شمسی</label><input class="form-control" id="acStDate" value="${safeDate()}">
639 + body:`<label class="form-label" for="acStWarehouse">انبار</label><select class="form-control" id="acStWarehouse">${options}</select>
640 + <label class="form-label" for="acStDate">تاریخ شمسی</label><input class="form-control" id="acStDate" value="${safeDate()}">
641 <p style="margin-top:12px">موجودی مبنا ثابت ثبت می‌شود؛ برای تأیید، شمارش همه اقلام ضروری است.</p>`,
642 footer:'<button class="btn btn-secondary" onclick="FINORA.Modal.close()">انصراف</button><button class="btn" onclick="window.AccountingView.createStocktake()">ایجاد جلسه</button>'});
643 }catch(e){Toast.error(e.message)}