Skip to content

Commit

Permalink
fix(settings) use aria-labels instead of off-screen labels
Browse files Browse the repository at this point in the history
  • Loading branch information
lorumic authored and edlerd committed Sep 29, 2023
1 parent 4853ef2 commit 06901ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/pages/settings/SettingFormCheckbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const SettingFormCheckbox: FC<Props> = ({
return (
<>
<Input
label={<span className="u-off-screen">{configField.key}</span>}
aria-label={configField.key}
id={getConfigId(configField.key)}
wrapperClassName="input-wrapper"
type="checkbox"
Expand Down
3 changes: 1 addition & 2 deletions src/pages/settings/SettingFormInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ const SettingFormInput: FC<Props> = ({
return (
<>
<Input
label={configField.key}
labelClassName="u-off-screen"
aria-label={configField.key}
id={getConfigId(configField.key)}
wrapperClassName="input-wrapper"
type={getInputType()}
Expand Down
3 changes: 1 addition & 2 deletions src/pages/settings/SettingFormPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ const SettingFormPassword: FC<Props> = ({
<>
<div className="input-row">
<Input
label={configField.key}
labelClassName="u-off-screen"
aria-label={configField.key}
id={getConfigId(configField.key)}
wrapperClassName="input-wrapper"
type={showPassword ? "text" : "password"}
Expand Down

0 comments on commit 06901ad

Please sign in to comment.