Need support for dirname attribute
Categories
(Core :: DOM: Core & HTML, enhancement)
Tracking
()
People
(Reporter: aharon, Assigned: vhilla)
References
(Blocks 2 open bugs, )
Details
(Keywords: dev-doc-complete, html5)
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30 Expected results: HTML5 added a new attribute for <input> and <textarea>, dirname (http://dev.w3.org/html5/spec/Overview.html#the-dirname-attribute): "A form control dirname attribute on a form control element enables the submission of the directionality of the element, and gives the name of the field that contains this value during form submission. If such an attribute is specified, its value must not be the empty string." Please note that the directionality is always either "ltr" or "rtl". It is never "auto" or "" or null. Example: <form action="addcomment.cgi" method=post> <p><label>Comment: <input type=text name="comment" dirname="comment.dir" required></label></p> <p><button name="mode" type=submit value="add">Post Comment</button></p> </form> When the user submits the form, the user agent includes three fields, one called "comment", one called "comment.dir", and one called "mode"; so if the user types "Hello", the submission body might be something like: comment=Hello&comment.dir=ltr&mode=add If the user manually switches to a right-to-left writing direction and enters "مرحبًا", the submission body might be something like: comment=%D9%85%D8%B1%D8%AD%D8%A8%D9%8B%D8%A7&comment.dir=rtl&mode=add
Updated•13 years ago
|
Comment 2•10 years ago
|
||
The URL of the specification changed and is now available here: http://www.w3.org/TR/html5/forms.html#submitting-element-directionality:-the-dirname-attribute (latest HTML 5 Working Draft) http://www.w3.org/html/wg/drafts/html/master/forms.html#submitting-element-directionality:-the-dirname-attribute (latest HTML 5.1 Nightly) One of these URLs should be added to the 'URL' field. (I don't have the rights to do that.) Sebastian
Comment 3•10 years ago
|
||
WHATWG specs are generally preferred IIUC.
Comment 4•10 years ago
|
||
Fine for me. So now this just needs someone to implement. Sebastian
Updated•5 years ago
|
Updated•1 year ago
|
Updated•9 months ago
|
Comment 6•9 months ago
|
||
These .dirName wpt tests fail due to the lack of the support.
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Comment 7•8 months ago
|
||
Updated•7 months ago
|
Assignee | ||
Comment 8•7 months ago
|
||
Clarification around dirname
on input
elements just merged to whatwg, see issue 9206
Assignee | ||
Comment 9•7 months ago
|
||
Updated•7 months ago
|
Updated•7 months ago
|
Assignee | ||
Comment 10•7 months ago
|
||
Depends on D178164
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 11•6 months ago
|
||
Pushed by vhilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/33fabcece85d Part 1: Implement dirname attr for input elements within forms. r=edgar https://hg.mozilla.org/integration/autoland/rev/8f514549a81c Part 2: Implement dirname attr for textarea elements within forms. r=edgar https://hg.mozilla.org/integration/autoland/rev/56d084bfc8b8 Part 3: Clean up after implementing dirname. r=edgar
Comment 12•6 months ago
|
||
Hey Vincent, once this lands and be stuck in m-c, can you nominate this for release note? Simply change the Status of the tracking flag relnote-firefox
from ---
to ?
, then fill in the fields on the comment.
Updated•6 months ago
|
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/40190 for changes under testing/web-platform/tests
Comment 14•6 months ago
|
||
Backed out for causing wpt unexpected passes.
Failure logs:
- https://treeherder.mozilla.org/logviewer?job_id=416860308&repo=autoland
- https://treeherder.mozilla.org/logviewer?job_id=416861655&repo=autoland
Backout link: https://hg.mozilla.org/integration/autoland/rev/21e8996740c5b77f29d3e7e1630f68dad8bc0dec
Upstream PR was closed without merging
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Assignee | ||
Comment 16•6 months ago
|
||
Missed some unexpected passes, did further testing and hopefully catched all.
Comment 17•6 months ago
|
||
Pushed by vhilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2e52989251ae Part 1: Implement dirname attr for input elements within forms. r=edgar https://hg.mozilla.org/integration/autoland/rev/9eba8dccc395 Part 2: Implement dirname attr for textarea elements within forms. r=edgar https://hg.mozilla.org/integration/autoland/rev/84a06f46030f Part 3: Clean up after implementing dirname. r=edgar
Comment 18•6 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2e52989251ae
https://hg.mozilla.org/mozilla-central/rev/9eba8dccc395
https://hg.mozilla.org/mozilla-central/rev/84a06f46030f
Assignee | ||
Comment 19•6 months ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: Text directionality can change through multiple ways. If a server wants to reliably display the submitted text correctly, it has to know about the text directionality as it was in the users editor.
[Affects Firefox for Android]: Yes
[Suggested wording]: Added support for the dirname attribute to pass text directionality information about input and textarea elements to the server.
[Links (documentation, blog post, etc)]:
https://www.w3.org/International/questions/qa-html-dir#reportingdirection
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#dirname
Upstream PR merged by moz-wptsync-bot
Comment 21•6 months ago
•
|
||
Added to 116.0a1 nightly notes https://www.mozilla.org/en-US/firefox/116.0a1/releasenotes/
Assignee | ||
Comment 22•6 months ago
|
||
Updated browser-compat-data: 20109
Updated•5 months ago
|
Comment 23•5 months ago
|
||
MDN documentation changes for this can be tracked on the following GitHub issue: https://github.com/mdn/content/issues/27760
(Thank you for the BCD additions)
Updated•4 months ago
|
Comment 24•4 months ago
|
||
Basic info with release note added to MDN, setting as dev-doc-complete for now. Follow-up improvements incoming as described in the linked GitHub issue.
Description
•