From 9c93f2813b94a27aa3a65f0e49295f94e689ff23 Mon Sep 17 00:00:00 2001 From: Vincent Hilla Date: Mon, 24 Jul 2023 10:26:08 +0200 Subject: [PATCH 1/4] Make dirname apply to hidden/tel/url/email inputs. See https://github.com/whatwg/html/pull/9490 --- files/en-us/web/html/element/input/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/en-us/web/html/element/input/index.md b/files/en-us/web/html/element/input/index.md index b65e6481c22d8ad..9c4dc987975e70a 100644 --- a/files/en-us/web/html/element/input/index.md +++ b/files/en-us/web/html/element/input/index.md @@ -324,7 +324,7 @@ Attributes for the `` element include the [global HTML attributes](/en-US | [`autocomplete`](#autocomplete) | all except `checkbox`, `radio`, and buttons | Hint for form autofill feature | | [`capture`](#capture) | `file` | Media capture input method in file upload controls | | [`checked`](#checked) | `checkbox`, `radio` | Whether the command or control is checked | -| [`dirname`](#dirname) | `search`, `text` | Name of form field to use for sending the element's directionality in form submission | +| [`dirname`](#dirname) | `hidden`, `text`, `search`, `url`, `tel`, `email` | Name of form field to use for sending the element's directionality in form submission | | [`disabled`](#disabled) | all | Whether the form control is disabled | | [`form`](#form) | all | Associates the control with a form element | | [`formaction`](#formaction) | `image`, `submit` | URL to use for form submission | @@ -399,7 +399,7 @@ A few additional non-standard attributes are listed following the descriptions o - `dirname` - - : Valid for `text` and `search` input types only, the `dirname` attribute enables the submission of the directionality of the element. When included, the form control will submit with two name/value pairs: the first being the [`name`](#name) and [`value`](#value), the second being the value of the `dirname` as the name with the value of `ltr` or `rtl` being set by the browser. + - : Valid for `hidden`, `text`, `search`, `url`, `tel` and `email` input types, the `dirname` attribute enables the submission of the directionality of the element. When included, the form control will submit with two name/value pairs: the first being the [`name`](#name) and [`value`](#value), the second being the value of the `dirname` as the name with the value of `ltr` or `rtl` being set by the browser. ```html
From 3f6030e1f2d6d1a9f2b06dc9cd5853566c75fd24 Mon Sep 17 00:00:00 2001 From: Vincent Hilla Date: Tue, 25 Jul 2023 08:51:25 +0200 Subject: [PATCH 2/4] Apply nit Co-authored-by: Chris Mills --- files/en-us/web/html/element/input/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/html/element/input/index.md b/files/en-us/web/html/element/input/index.md index 9c4dc987975e70a..29ee943460bf781 100644 --- a/files/en-us/web/html/element/input/index.md +++ b/files/en-us/web/html/element/input/index.md @@ -399,7 +399,7 @@ A few additional non-standard attributes are listed following the descriptions o - `dirname` - - : Valid for `hidden`, `text`, `search`, `url`, `tel` and `email` input types, the `dirname` attribute enables the submission of the directionality of the element. When included, the form control will submit with two name/value pairs: the first being the [`name`](#name) and [`value`](#value), the second being the value of the `dirname` as the name with the value of `ltr` or `rtl` being set by the browser. + - : Valid for `hidden`, `text`, `search`, `url`, `tel`, and `email` input types, the `dirname` attribute enables the submission of the directionality of the element. When included, the form control will submit with two name/value pairs: the first being the [`name`](#name) and [`value`](#value), and the second being the value of the `dirname` attribute as the name, with a value of `ltr` or `rtl` as set by the browser. ```html From 2a6b0bae528cb97718b9f1618ca52f6a9b34d590 Mon Sep 17 00:00:00 2001 From: Vincent Hilla Date: Wed, 9 Aug 2023 21:07:39 +0200 Subject: [PATCH 3/4] Update files/en-us/web/html/element/input/index.md Co-authored-by: Brian Thomas Smith --- files/en-us/web/html/element/input/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/files/en-us/web/html/element/input/index.md b/files/en-us/web/html/element/input/index.md index 29ee943460bf781..e1984a47648a685 100644 --- a/files/en-us/web/html/element/input/index.md +++ b/files/en-us/web/html/element/input/index.md @@ -400,6 +400,7 @@ A few additional non-standard attributes are listed following the descriptions o - `dirname` - : Valid for `hidden`, `text`, `search`, `url`, `tel`, and `email` input types, the `dirname` attribute enables the submission of the directionality of the element. When included, the form control will submit with two name/value pairs: the first being the [`name`](#name) and [`value`](#value), and the second being the value of the `dirname` attribute as the name, with a value of `ltr` or `rtl` as set by the browser. + For more information, see the [`dirname` attribute](/en-US/docs/Web/HTML/Attributes/dirname). ```html From b9a857ea4979827385ba80915a5f2e41975dc05d Mon Sep 17 00:00:00 2001 From: Vincent Hilla Date: Wed, 9 Aug 2023 21:15:36 +0200 Subject: [PATCH 4/4] Link to dirname page --- files/en-us/web/html/element/input/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/en-us/web/html/element/input/index.md b/files/en-us/web/html/element/input/index.md index e1984a47648a685..5a34297dcbdff67 100644 --- a/files/en-us/web/html/element/input/index.md +++ b/files/en-us/web/html/element/input/index.md @@ -400,7 +400,6 @@ A few additional non-standard attributes are listed following the descriptions o - `dirname` - : Valid for `hidden`, `text`, `search`, `url`, `tel`, and `email` input types, the `dirname` attribute enables the submission of the directionality of the element. When included, the form control will submit with two name/value pairs: the first being the [`name`](#name) and [`value`](#value), and the second being the value of the `dirname` attribute as the name, with a value of `ltr` or `rtl` as set by the browser. - For more information, see the [`dirname` attribute](/en-US/docs/Web/HTML/Attributes/dirname). ```html @@ -414,6 +413,8 @@ A few additional non-standard attributes are listed following the descriptions o ``` When the form above is submitted, the input cause both the `name` / `value` pair of `fruit=cherry` and the `dirname` / direction pair of `fruit.dir=ltr` to be sent. + + For more information, see the [`dirname` attribute](/en-US/docs/Web/HTML/Attributes/dirname). - `disabled`