1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-03-15 12:29:16 +01:00

(bug) fix a11y of product form

This commit is contained in:
Sylvain 2023-02-02 13:05:16 +01:00 committed by Sylvain
parent a1e878eec6
commit 7a1809940c
2 changed files with 2 additions and 2 deletions

View File

@ -184,7 +184,7 @@ export const ProductForm: React.FC<ProductFormProps> = ({ product, title, onSucc
link
limit={6000}
id="description"
ariaLabel={t('app.admin.store.product_form.product_description')} />
ariaLabel={t('app.admin.store.product_form.description')} />
<FormSwitch control={control}
id="is_active"
formState={formState}

View File

@ -29,7 +29,7 @@ describe('ProductForm', () => {
for (const machine of machines) {
expect(screen.getByLabelText(machine.name)).toBeInTheDocument();
}
expect(screen.getByLabelText(/app.admin.store.product_form.product_description/)).toBeInTheDocument();
expect(screen.getByLabelText(/app.admin.store.product_form.description/)).toBeInTheDocument();
expect(screen.getByRole('button', { name: /app.admin.store.product_form.add_product_file/ })).toBeInTheDocument();
expect(screen.getByLabelText(/app.admin.advanced_accounting_form.code/)).toBeInTheDocument();
expect(screen.getByLabelText(/app.admin.advanced_accounting_form.analytical_section/)).toBeInTheDocument();