Bug 255907

Summary: Submission of input element directionality for non-text, non-search type
Product: WebKit Reporter: Vincent Hilla <vhilla>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: akeerthi, annevk, cdumez, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: All   
OS: All   

Description Vincent Hilla 2023-04-25 00:49:54 PDT
Version: Epiphany Technology Preview 44.0-40-g6c7e4587d+

Problem:
The standard is somewhat obscure on submitting an input elements directionality for non-text, non-search types. Although, dirname does not apply to them, the standard currently does not specify how this should be enforced. With pull request 9207, this hopefully will change. Please feel free to provide input on this pull request.

See: 
https://github.com/whatwg/html/pull/9207
https://html.spec.whatwg.org/#submitting-element-directionality:-the-dirname-attribute

What steps will reproduce the problem?
(1) Create a html file with the following content
<form href="#">
<input type="hidden" name="hidden" dirname="hidden.dir" />
<input type="tel" name="tel" dirname="tel.dir" />
<input type="submit" />
</form>
(2) Open this file
(3) Press submit

What is the expected result?
I believe, if one strictly follows the standard, the URL should change to ...test.html?hidden=&hidden.dir=ltrtel=&tel.dir=ltr. After the pull request, it should change to ...test.html?hidden=&tel=

What happens instead?
The URL changes to ...test.html?hidden=&tel=&tel.dir=ltr
Comment 1 Radar WebKit Bug Importer 2023-05-02 00:50:17 PDT
<rdar://problem/108776213>