mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-16 10:05:00 +03:00
fix(frontend): make inbound forms accessible to screen readers (#7025)
Expose selectable options and selected values, associate validation guidance with controls, and contain keyboard focus in inbound dialogs. Preserve create and edit serialization and add Chromium keyboard and accessibility checks.
This commit is contained in:
@@ -221,6 +221,9 @@ export const ValidationErrors: Story = {
|
||||
play: async ({ canvas, userEvent }) => {
|
||||
const remarkError = await canvas.findByText('Remark is required');
|
||||
await waitFor(() => expect(remarkError).toBeVisible());
|
||||
await expect(canvas.getByRole('textbox', { name: 'Remark' })).toHaveAccessibleDescription(
|
||||
'Remark is required',
|
||||
);
|
||||
await waitFor(() => expect(canvas.getByText('Port must be between 1 and 65535')).toBeVisible());
|
||||
await userEvent.type(canvas.getByPlaceholderText('vless-reality-443'), 'vless-reality-443');
|
||||
await userEvent.click(canvas.getByRole('button', { name: 'Validate' }));
|
||||
|
||||
Reference in New Issue
Block a user