Skip to content

Commit

Permalink
Make it clear that linebreaks is allowed in textareas (#37229)
Browse files Browse the repository at this point in the history
When skimming the placeholder page, it is easy to come to the conclusion that linebreaks aren't allowed in placeholders, even on textareas. In fact the only concession to this fact is in the compatibility chart.

So change the note text a bit to make this clearer.
  • Loading branch information
ksmadsen authored Dec 16, 2024
1 parent d2feb0d commit 095b93e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/en-us/web/html/attributes/placeholder/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Effective placeholder text includes a word or short phrase that hints at the exp
The `placeholder` attribute is supported by the following input types: `{{HTMLElement("input/text", "text")}}`, `{{HTMLElement("input/search", "search")}}`, `{{HTMLElement("input/url", "url")}}`, `{{HTMLElement("input/tel", "tel")}}`, `{{HTMLElement("input/email", "email")}}`, and `{{HTMLElement("input/password", "password")}}`. It is also supported by the `{{HTMLElement("textarea")}}` element. The [example](#example) below shows the `placeholder` attribute in use to explain the expected format of an input field.

> [!NOTE]
> The `placeholder` attribute can't include any line feeds (LF) or carriage returns (CR). If either is included in the value, the placeholder text will be clipped.
> Except in `{{HTMLElement("textarea")}}` elements, the `placeholder` attribute can't include any line feeds (LF) or carriage returns (CR). If either is included in the value, the placeholder text will be clipped.
## Accessibility concerns

Expand Down

0 comments on commit 095b93e

Please sign in to comment.