Need support for dirname attribute

NEW
Unassigned

Status

()

Core
HTML: Form Submission
6 years ago
11 months ago

People

(Reporter: Aharon (Vladimir) Lanin, Unassigned)

Tracking

(Blocks: 2 bugs, {dev-doc-needed, html5})

Trunk
dev-doc-needed, html5
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
Created attachment 550079 [details]
dirname.html

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
(Reporter)

Updated

6 years ago
Blocks: 613154

Updated

6 years ago
Status: UNCONFIRMED → NEW
Component: General → HTML: Form Submission
Ever confirmed: true
Keywords: dev-doc-needed, html5
OS: Windows 7 → All
QA Contact: general → form-submission
Hardware: x86_64 → All

Updated

6 years ago
Depends on: 548206
Blocks: 802882
Duplicate of this bug: 850337
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
WHATWG specs are generally preferred IIUC.
Fine for me.

So now this just needs someone to implement.

Sebastian
You need to log in before you can comment on or make changes to this bug.