Summarized test results:
HTML5, the dirname attribute

Intended audience: users, XHTML/HTML coders (using editors or scripting), script developers (PHP, JSP, etc.), CSS coders, Web project managers, and anyone who wants to know whether dirname is supported in browsers.

Updated

These tests check whether a dirname attribute passes information about the direction of an input field to the server.

Note that the snapshot summaries of these test results are for released versions of the browsers tested. Versions that are still in development may provide better support for these features. The tests themselves do not test any vendor prefixes.

results

To see the test, click on the link in the left-most column. To see detailed results for a single test, click on the link in the right-most column. To submit test data for a single test, click on the link in the right-most column and then follow the link on that page.

The tables show the latest results from the W3C Test Framework. Above the tables are summaries of the results at a given date. The table data may be more up-to-date than the summary. The tables may also contain some incorrectly scored tests, and tests that relate to non-released versions of browsers. These are not included in the summary.

Support for dirname

Snapshot summary, 2013-07-04
Firefox 21.0, Opera 12.15, Internet Explorer 10 & 9, Chrome 27.0.1453.116, Safari 5.1.9

Chrome and Opera both support dirname, and pass the direction information to the server.

Unfortunately, Opera doesn't support dir=auto at the moment, which restricts the usefulness of dirname for auto-detection.

Assertion Gecko Presto Trident WebKit Detailed results
dirname, ltr The dir attribute is set to ltr on the input tag. The dirname attribute will cause the direction of the input element to be passed with the form parameters.
dirname, rtl The dir attribute is set to rtl on the input tag. The dirname attribute will cause the direction of the input element to be passed with the form parameters.
dirname, inherits ltr The dir attribute is set to ltr on an ancestor of the input tag. The dirname attribute will cause the direction of the input element to be passed with the form parameters.
dirname, inherits rtl The dir attribute is set to rtl on an ancestor of the input tag. The dirname attribute will cause the direction of the input element to be passed with the form parameters.
dirname, default No dir attribute is set, so the document is ltr by default. The dirname attribute will cause the direction of the input element to be passed with the form parameters.
dirname, auto, ltr text The dir attribute is set to auto. If the form field auto-detects ltr direction based on first strong character input, the dirname attribute will cause the direction of the input element to be passed with the form parameters.
dirname, auto, rtl text The dir attribute is set to auto. If the form field auto-detects rtl direction based on first strong character input, the dirname attribute will cause the direction of the input element to be passed with the form parameters.
dirname, scripted The dir attribute is set using JavaScript. The dirname attribute will cause the direction of the input element to be passed with the form parameters.