Accessibility of input fields #3589
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Yes, you're correct. According to the Paste design system guidelines, each form field should have its own label. This is important for accessibility as it helps screen readers and other assistive technologies understand the purpose of each field. In your suggested construction, you've separated the two inputs with their own labels which is a more accessible approach. Here's how it aligns with the guidelines:
So, your construction would look something like this: <Label htmlFor="badgeInputBehavior">Badge input behavior</Label>
<Input id="badgeInputBehavior" type="text" placeholder="Increase, Decrease, Set amount" />
<Label htmlFor="amount">Amount</Label>
<Input id="amount" type="number" placeholder="0, 1, etc." /> Remember to avoid using placeholder text as the main form of instruction, as it disappears when the user starts typing and is not broadly supported by assistive technologies. Instead, consider using Help Text to provide additional context and instructions. Here are some similar discussions:
|
Beta Was this translation helpful? Give feedback.
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary.
Yes, you're correct. According to the Paste design system guidelines, each form field should have its own label. This is important for accessibility as it helps screen readers and other assistive technologies understand the purpose of each field.
In your suggested construction, you've separated the two inputs with their own labels which is a more accessible approach. Here's how it aligns with the guidelines:
htmlFor
prop that equals theid
of the associated input.