Skip to content

Commit

Permalink
[@mantine/core] DatePickerInput: Fix incorrect aria-label being set…
Browse files Browse the repository at this point in the history
… on the input element (#6530)

according to accessibility parts of DatePickerInput docs it is said that if `label` prop is set, input will be accessible it is not required to set `aria-label`.

But since there was assignment of `aria-label` inside PickerInputBase on Input it essentially overrode the label from InputWrapper connected with `htmlFor` attribute.

It made component harder to use inside e2e tests that rely on labels for element locators, since component locator should be dynamic or `aria-label` attribute must be passed alongside with `label` attribute
  • Loading branch information
vorant94 committed Aug 6, 2024
1 parent dcba0a4 commit e4041cf
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ export const PickerInputBase = factory<PickerInputBaseFactory>((_props, ref) =>
>
<Popover.Target>
<Input
aria-label={formattedValue || placeholder}
data-dates-input
data-read-only={readOnly || undefined}
disabled={disabled}
Expand Down

0 comments on commit e4041cf

Please sign in to comment.