From 11114d092abeaf93e89f8f1259167c26718a3abe Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 24 Oct 2023 06:29:22 -0700 Subject: [PATCH] Make dir=auto and dirname apply to more form controls This makes two changes: * Applies the auto directionality algorithm to Hidden, Password, Submit Button, Reset Button, and Button input elements. * Adds support for the dirname attribute to Password and Submit Button input elements. And it uses a shared concept between these two features so they will no longer diverge going forward. (The concept can still be shared despite Reset Button and Button input elements not supporting the dirname attribute as the concept is only consulted in form submission where those elements have already been filtered out.) Tests: https://github.com/web-platform-tests/wpt/pull/42427 Fixes #3330 and fixes #9669. --- source | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/source b/source index c16a1d33f8e..27057754f7a 100644 --- a/source +++ b/source @@ -13578,6 +13578,8 @@ Transport Protocol">HTTP</abbr> today.</p>
  • Return the parent directionality of element.

  • @@ -13588,16 +13590,27 @@ Transport Protocol">HTTP</abbr> today.</p> Yes Yes - · + Yes · @@ -46564,7 +46577,7 @@ interface HTMLInputElement : HTMLElement { · · - · + Yes · · @@ -48557,6 +48570,7 @@ ldh-str = < as defined in apply to the element: autocomplete, + dirname, maxlength, minlength, pattern, @@ -48583,7 +48597,6 @@ ldh-str = < as defined in accept, alt, checked, - dirname, formaction, formenctype, formmethod, @@ -50550,6 +50563,7 @@ ldh-str = < as defined in apply to the element: + dirname, formaction, formenctype, formmethod, @@ -50568,7 +50582,6 @@ ldh-str = < as defined in alt, autocomplete, checked, - dirname, height, list, max, @@ -59664,13 +59677,9 @@ fur
  • If the element has a dirname attribute, that - attribute's value is not the empty string, and the element is either a textarea - element or an input element whose type - attribute is in the Hidden, - Text, Search, Telephone, URL, - or Email state, then:

    + attribute's value is not the empty string, and the element is an auto-directionality form-associated + element:
    1. Let dirname be the value of the element's