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

The tables show results for tests run on the date shown. Above the tables are summaries of the results at that date. The table data may be more up-to-date than the summary. If the tables contain some incorrectly scored tests, or tests that relate to non-released versions of browsers, these are not included in the summary.

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.

Support for dirname

Snapshot summary, 2014-02-17
Firefox 27.0, Chrome 32.0.1700.107, Safari 6.1.1, Internet Explorer 9, Opera 19.0

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

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

Assertion Firefox Chrome Safari Opera IE 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.