Skip to content

Commit

Permalink
Adding more info about when to use lable etc..
Browse files Browse the repository at this point in the history
  • Loading branch information
OsamaAbdellateef committed Oct 9, 2024
1 parent ca21485 commit 4fa8999
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/getting-started/form-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ Marigold's form components allow to set these properties like shown below. All f

## Label and Help Text

Labels are essential for accessibility and clarity, ensuring that each form field is clearly defined. In most cases, a label should be provided for each form control to describe the expected input.
Labels are essential for accessibility and clarity, ensuring that each form field is clearly defined. In most cases, a label should be provided for each form control to describe the expected input. They are used when fields require specific instructions (e.g., name, email, or password should have a clear label).

However, in some specific cases, such as in search bars or simple forms with obvious context, labels might be omitted in favor of alternatives like `aria-label` for accessibility.
However, labels might not be necessary when the purpose of the input is obvious from context. For example, in search bars because the purpose of the input is obvious

Helper Text, on the other hand, should complement the label by providing additional context or validation message.

Expand Down

0 comments on commit 4fa8999

Please sign in to comment.