Skip to content

Commit

Permalink
Fixes: capture and autocomplete (mdn#35845)
Browse files Browse the repository at this point in the history
* Fixes: capture and autocomplete

* move capture to under file input type

* token list autocomplete value for textarea

* link to attribute

* Apply suggestions from code review

Co-authored-by: Chris Mills <[email protected]>

---------

Co-authored-by: Chris Mills <[email protected]>
  • Loading branch information
estelle and chrisdavidmills authored Sep 12, 2024
1 parent f56df7c commit 050bcdb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions files/en-us/web/api/htmlinputelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ Some properties only apply to input element types that support the corresponding

- : A string that represents the element's [`accept`](/en-US/docs/Web/HTML/Element/input#accept) attribute, containing comma-separated list of file types that can be selected.

- {{domxref("HTMLInputElement.capture", "capture")}}

- : A string that represents the element's [`capture`](/en-US/docs/Web/HTML/Element/input#capture) attribute, indicating the media capture input method in file upload controls.

- {{domxref("HTMLInputElement.files", "files")}}

- : A {{domxref("FileList")}} that represents the files selected for upload.
Expand All @@ -179,10 +183,6 @@ Some properties only apply to input element types that support the corresponding

- : A string that represents the element's [`autocomplete`](/en-US/docs/Web/HTML/Element/input#autocomplete) attribute, indicating whether the value of the control can be automatically completed by the browser.

- {{domxref("HTMLInputElement.capture", "capture")}}

- : A string that represents the element's [`capture`](/en-US/docs/Web/HTML/Element/input#capture) attribute, indicating the media capture input method in file upload controls.

- {{domxref("HTMLInputElement.max", "max")}}

- : A string that represents the element's [`max`](/en-US/docs/Web/HTML/Element/input#max) attribute, containing the maximum (numeric or date-time) value for this item, which must not be less than its minimum ([`min`](/en-US/docs/Web/HTML/Element/input#min) attribute) value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The **`autocomplete`** property of the {{DOMxRef("HTMLTextAreaElement")}} interf

## Value

A string that is `"on"`, `"off"`, or the empty string `""` if unspecified or set to an invalid value.
A string representing the value of the `autocomplete` attribute (`"on"`, `"off"`, or a [`<token-list>`](/en-US/docs/Web/HTML/Attributes/autocomplete#token_list_tokens)) or the empty string (`""`) if unspecified.

## Examples

Expand All @@ -32,3 +32,6 @@ console.log(textArea.autocomplete);
## See also

- {{HTMLElement("textarea")}}
- HTML [`autocomplete`](/en-US/docs/Web/HTML/Attributes/autocomplete) attribute
- ARIA [`aria-autocomplete`](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-autocomplete) attribute
- [Turning off autocompletion](/en-US/docs/Web/Security/Practical_implementation_guides/Turning_off_form_autocompletion)
3 changes: 2 additions & 1 deletion files/en-us/web/html/element/textarea/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ This element includes the [global attributes](/en-US/docs/Web/HTML/Global_attrib

- `off`: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.
- `on`: The browser can automatically complete the value based on values that the user has entered during previous uses.
- [`<token-list>`](/en-US/docs/Web/HTML/Attributes/autocomplete#token_list_tokens): An ordered set of space-separated autofill detail tokens, optionally preceded by a sectioning token, a billing or shipping grouping token, and/or a token identifying the type of recipient.

If the `autocomplete` attribute is not specified on a `<textarea>` element, then the browser uses the `autocomplete` attribute value of the `<textarea>` element's form owner. The form owner is either the {{HTMLElement("form")}} element that this `<textarea>` element is a descendant of or the form element whose `id` is specified by the `form` attribute of the input element. For more information, see the [`autocomplete`](/en-US/docs/Web/HTML/Element/form#autocomplete) attribute in {{HTMLElement("form")}}.
`<textarea>` elements that don't specify the `autocomplete` attribute inherit the `autocomplete` `on` or `off` status set on the `<textarea>`'s form owner. The form owner is either the {{HTMLElement("form")}} element that this `<textarea>` element is a descendant of or the form element whose `id` is specified by the `form` attribute of the input element. For more information, see the [`autocomplete`](/en-US/docs/Web/HTML/Element/form#autocomplete) attribute in {{HTMLElement("form")}}.

- `autocorrect` {{non-standard_inline}}

Expand Down

0 comments on commit 050bcdb

Please sign in to comment.