aboveyunhai / chakra-dayzed-datepicker

Chakra UI + Dayzed = datepicker
https://aboveyunhai.github.io/chakra-dayzed-datepicker/
MIT License
228 stars 51 forks source link

Accessibility/form label #62

Open david-morris opened 1 year ago

david-morris commented 1 year ago

It would be nice if it was possible to add an aria-label and/or HTML label.

The <FormLabel> Chakra component doesn't work with this, presumably because the input's ID is being set by whatever is doing the popover logic.

Since that's probably a lot of internal logic, it would be nice to be able to explicitly pass down an aria-label.

aboveyunhai commented 1 year ago

@david-morris I think you can use id and inputProps to pass other attributes, inputProps inside propConfigs can override everything inside the input including id and others.

david-morris commented 1 year ago

When I pass id in version 0.2.9, inspect element still says its id is "popover-trigger-:r8:".

aboveyunhai commented 1 year ago

When I pass id in version 0.2.9, inspect element still says its id is "popover-trigger-:r8:".

oops, that's rough. Let me have a redesign for the whole input and popover trigger to follow the standard for the new version, the current popover over the entire input is actually a wrong design. That's why. Otherwise there is no way to handle it.

david-morris commented 1 year ago

Thankfully what I'm building is not in the public sector and relies heavily on the user seeing and reading maps, so it's just Playwright trying to use the aria information (and there's workarounds).