Summary: A new attribute that enables submitting the directionality of an element within an HTML form. Languages are written left to right or right to left and this attribute enables certain form control elements, such as text input, to include this directionality information in the form submission. This is relevant, e.g. when wanting to display submitted content correctly.
For a detailed explanation, see https://www.w3.org/International/questions/qa-html-dir#reportingdirection
Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=675943
Specification: https://html.spec.whatwg.org/#submitting-element-directionality:-the-dirname-attribute
Standards Body: WHATWG
Platform coverage: all
Preference: n/a
DevTools Bug: n/a
Link to standards-positions discussion: https://github.com/mozilla/standards-positions/issues/782
Other browsers:
Blink: shipped, since 2011
WebKit: shipped, since 2020
Web-platform-tests:
https://wpt.fyi/results/html/semantics/forms/attributes-common-to-form-controls
Tests for dirname on textarea are being written
Example: see https://www.w3.org/International/questions/qa-html-dir#reportingdirection
—-----------
Intent to ship:
As of Firefox 114 I intend to turn the dirname attribute on by default. Status in other browsers is Blink: shipped, WebKit: shipped.
Bug to turn on by default: https://bugzilla.mozilla.org/show_bug.cgi?id=675943
Standard: https://html.spec.whatwg.org/#submitting-element-directionality:-the-dirname-attribute