-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
required id property in DateInput, SingleDatePicker, SingleDatePickerInput #326
Comments
It's done on purpose. For accessibility, all inputs must be both wrapped in a (also for accessibility, inputs shouldn't be used outside of forms) |
Thank you Jordan. Got the idea.
|
You're right, |
This should be renamed to something more obvious, needed to browse the web to understand why startDateId is required. Also it shouldnt be required imo. |
Also I dont use any labels around or a form, I just use the component via onChange callback, so there are no labels at all. |
That's not accessible; a form input must always have a wrapped label that's for-ID linked. |
We are developing internal systems which are not used by people which need these accessible attributes. Also the HTML standard doesn't require them, so I think it's overreach to require these attributes there. |
Employees require a11y affordances just the same as end users - the legal requirements are often stronger for employees, in fact. The HTML standard doesn't require a lot of things, but that's not the authority on UI. |
Hi,
DateInput, SingleDatePicker and SingleDatePickerInput has
id
property, which is required.I cannot see why it is done as mandatory field.
Is it done on purpose or the field can be optional?
See src/components/DateInput.jsx#L7
and
The text was updated successfully, but these errors were encountered: