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

fix(a11y): label uncovered financial controls (ui-control-structure.test.mjs)

davoodmehraban89 committed Oct 31, 2026 at 00:29 UTC 9c2ef98c24d202cd5b0874e5811441fb0d31d1bd
1 file changed +18
tests/ui-control-structure.test.mjs
+18
@@ -166,6 +166,24 @@ test('A03: financial list views encode imported record IDs and textual values',
166 assert.ok(expenses.includes('this._esc(JSON.stringify(String(e.id ??'));
167 });
168
169 +test('Q01: remaining financial grid, reporting and settings inputs announce their function', () => {
170 + const read=name=>fs.readFileSync(path.join(root,'src','views',name+'.js'),'utf8');
171 + const cases=[
172 + ['ReportsView',['aria-label="از تاریخ گزارش"','aria-label="تا تاریخ گزارش"']],
173 + ['InvoiceFormView',['aria-label="جستجوی کالای ردیف فاکتور"','aria-label="نوع تخفیف ردیف"','aria-label="وضعیت پرداخت فاکتور"']],
174 + ['AccountingView',['aria-label="حساب ردیف سند"','aria-label="مبلغ بدهکار ردیف"','aria-label="مبلغ بستانکار ردیف"','aria-label="شرح ردیف سند"','for="acStWarehouse"']],
175 + ['TreasuryView',['aria-label="جستجوی تراکنش‌های خزانه"']],
176 + ['ChequesView',['aria-label="جستجوی چک"']],
177 + ['SettingsView',['aria-label="تعداد صفرهای میانبر مثبت"','aria-label="متن تایید پاک کردن داده‌ها"']]
178 + ];
179 + for(const [name,labels] of cases){
180 + const source=read(name);
181 + for(const label of labels)assert.ok(source.includes(label),name+' missing programmatic name: '+label);
182 + }
183 + const runner=fs.readFileSync(path.join(root,'tests','windows-vm-installed-tauri-cdp.cjs'),'utf8');
184 + assert.ok(runner.includes('audit.fieldsMissingProgrammaticLabel <= 5'));
185 +});
186 +
187 test('Q01: Escape is handled once for nested financial dialogs and shortcut target is topmost', () => {
188 const shortcuts = fs.readFileSync(path.join(root,'src','core','KeyboardShortcuts.js'),'utf8');
189 const modal = fs.readFileSync(path.join(root,'src','core','Modal.js'),'utf8');