Skip to content

Commit 3a04dd3

Browse files
authored
Enabled no autofocus rule (kiesraad#2704)
1 parent e508b8e commit 3a04dd3

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

frontend/biome.jsonc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@
5757
"rules": {
5858
"recommended": true,
5959
// TODO: all disabled rules below should be enabled again and fixed
60-
"a11y": {
61-
"noAutofocus": "off"
62-
},
6360
"complexity": {
6461
"noUselessFragments": "warn"
6562
},

frontend/src/components/ui/CheckboxAndRadio/CheckboxAndRadio.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export const CheckboxAndRadio = forwardRef<HTMLInputElement, CheckboxAndRadioPro
4747
ref={ref}
4848
onChange={onChange}
4949
disabled={disabled}
50+
// biome-ignore lint/a11y/noAutofocus: for usability we have to use autofocus
5051
autoFocus={autoFocus}
5152
aria-invalid={hasError}
5253
{...inputProps}

frontend/src/components/ui/InputField/InputField.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export function InputField({
6464
value={value}
6565
defaultValue={inputFieldProps.defaultValue}
6666
autoComplete="off"
67+
// biome-ignore lint/a11y/noAutofocus: for usability we have to use autofocus
6768
autoFocus={autoFocus}
6869
aria-invalid={error ? "true" : "false"}
6970
aria-errormessage={error ? `${name}-hint_or_error` : undefined}

0 commit comments

Comments
 (0)