Summarized test results:
HTML5, dir=auto

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 ruby markup works in current browsers.

Updated

These tests check whether user agents correctly apply the auto value of the dir attribute to improve handling of bidirectional text in languages such as Arabic, Hebrew, Persian, Thaana, Urdu, etc.

Note that 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 do not use any vendor prefixes.

results

A number of tests could not be fully checked because there was no font on the system to support one or more of the glyphs in the test. These tests were skipped.

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.

dir=auto

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

Firefox and Chrome support the tests for dir=auto. Safari appears to support auto-detection of direction, but not isolation.

Internet Explorer and Opera do not support dir=auto.

Basic tests

Assertion Firefox Chrome Safari Opera IE Detailed results
dir=auto, inline auto direction When dir='auto', the direction is set according to the first strong character of the text. dir=auto is applied to an inline element here, in various base direction contexts.
dir=auto, inline isolation dir='auto' on an inline element will directionally isolate its contents from a following number.
dir=auto, start with L When dir='auto', the direction is set according to the first strong character of the text. In this test, it is the Latin letter A, thus the direction must be resolved as LTR.
dir=auto, start with R/AL When dir='auto', the direction is set according to the first strong character of the text. In this test, it is the Hebrew or Arabic letter Alef, thus the direction must be resolved as RTL.

More dir=auto tests

Assertion Firefox Chrome Safari Opera IE Detailed results
dir=auto, isolated in LTR text When dir='auto', the direction is set according to the first strong character of the text, but the element behaves externally as a neutral character. In this test, it allows a preceding R to form a single directional run with a succeeding number.
dir=auto, start with bdi, then L When dir='auto', the direction is set according to the first strong character of the text while ignoring bdi elements. In this test, it is the Latin letter A, thus the direction must be resolved as LTR.
dir=auto, start with bdi, then R When dir='auto', the direction is set according to the first strong character of the text while ignoring bdi elements. In this test, it is the Hebrew letter Alef, thus the direction must be resolved as RTL.
dir=auto, start with dir=auto, then L When dir='auto', the direction is set according to the first strong character of the text while ignoring contained elements with an explicit dir of their own. In this test, it is the Latin letter A, thus the direction must be resolved as LTR.
dir=auto, start with dir=auto, then R When dir='auto', the direction is set according to the first strong character of the text while ignoring contained elements with an explicit dir of their own. In this test, it is the Hebrew letter Alef, thus the direction must be resolved as RTL.
dir=auto, start with dir, then L When dir='auto', the direction is set according to the first strong character of the text while ignoring contained elements with an explicit dir of their own. In this test, it is the Latin letter A, thus the direction must be resolved as LTR.
dir=auto, start with dir, then R When dir='auto', the direction is set according to the first strong character of the text while ignoring contained elements with an explicit dir of their own. In this test, it is the Hebrew letter Alef, thus the direction must be resolved as RTL.
dir=auto, start with L within contained element When dir='auto', the direction is set according to the first strong character of the text, including text within contained elements. In this test, it is the Latin letter A, thus the direction must be resolved as LTR.
dir=auto, start with R within contained element When dir='auto', the direction is set according to the first strong character of the text, including text within contained elements. In this test, it is the Hebrew letter Alef, thus the direction must be resolved as RTL.
dir=auto, start with script, then L When dir='auto', the direction is set according to the first strong character of descendant text while ignoring descendant script elements. In this test, it is the Latin letter A, thus the direction must be resolved as LTR.
dir=auto, start with script, then R When dir='auto', the direction is set according to the first strong character of descendant text while ignoring descendant script elements. In this test, it is the Hebrew letter Alef, thus the direction must be resolved as RTL.
dir=auto, start with style, then L When dir='auto', the direction is set according to the first strong character of descendant text while ignoring descendant style elements. In this test, it is the Latin letter A, thus the direction must be resolved as LTR.
dir=auto, start with style, then R When dir='auto', the direction is set according to the first strong character of descendant text while ignoring descendant style elements. In this test, it is the Hebrew letter Alef, thus the direction must be resolved as RTL.
dir=auto, start with textarea, then L When dir='auto', the direction is set according to the first strong character of descendant text while ignoring descendant textarea elements. In this test, it is the Latin letter A, thus the direction must be resolved as LTR.
dir=auto, start with textarea, then R When dir='auto', the direction is set according to the first strong character of descendant text while ignoring descendant textarea elements. In this test, it is the Hebrew letter Alef, thus the direction must be resolved as RTL.
dir=auto, start with EN, then L When dir='auto', the direction is set according to the first strong character of the text. In this test, it is the Latin letter A since digits are not strongly directional, thus the direction must be resolved as LTR.
dir=auto, start with EN, then R When dir='auto', the direction is set according to the first strong character of the text. In this test, it is the Hebrew letter Alef since digits are not strongly directional, thus the direction must be resolved as RTL.
dir=auto, start with N, then EN, then L When dir='auto', the direction is set according to the first strong character of the text. In this test, it is the Latin letter A since neutrals and digits are not strongly directional, thus the direction must be resolved as LTR.
dir=auto, start with N, then EN, then R When dir='auto', the direction is set according to the first strong character of the text. In this test, it is the Hebrew letter Alef since neutrals and digits are not strongly directional, thus the direction must be resolved as RTL.
dir=auto, start with N, then EN, then L When dir='auto', the direction is set according to the first strong character of the text, ignoring neutrals and numbers. If there is no strong character, as in this test, the direction defaults to LTR.
dir=auto, start with N, then L When dir='auto', the direction is set according to the first strong character of the text. In this test, it is the Latin letter A since neutrals are not strongly directional, thus the direction must be resolved as LTR.
dir=auto, start with N, then R When dir='auto', the direction is set according to the first strong character of the text. In this test, it is the Hebrew letter Alef since neutrals are not strongly directional, thus the direction must be resolved as RTL.

input and dir=auto

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

Firefox and Chrome support all tests.

Safari appears to consistently apply a LTR direction to the input value, which is why it passes one test but not the other.

Other browsers tested, Internet Explorer and Opera, assign direction with regards to the current base direction.

Basic tests

Assertion Firefox Chrome Safari Opera IE Detailed results
input with dir=auto, start with L When dir='auto', the direction of an input element of type text is set according to the first strong character of its value. In this test, the first strong character is the Latin letter A, thus the direction must be resolved as LTR.
input with dir=auto, start with R/AL en dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Hebrew or Arabic letter Alef, thus the direction must be resolved as RTL.
input with dir=auto, various types of input starting with L When dir='auto', the direction of an input element of type search, telephone, url, or email is set as LTR when the first strong character of its value is of type L (here the Latin letter A).
input with dir=auto, various types of input starting with R When dir='auto', the direction of an input element of type search, telephone, url, or email is set as RTL when the first strong character of its value is of type R (here the Hebrew letter aleph).
input with dir=auto, various types of input starting with AL When dir='auto', the direction of an input element of type search, telephone, url, or email is set as RTL when the first strong character of its value is of type AL (here the Arabic letter alef).

Other tests

Assertion Firefox Chrome Safari Opera IE Detailed results
input with dir=auto, start with EN+L When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Latin letter A since digits are not strongly directional, thus the direction must be resolved as LTR.
input with dir=auto, start with EN+R When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Hebrew letter Alef since digits are not strongly directional, thus the direction must be resolved as RTL.
input with dir=auto, start with N+EN+L When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Latin letter A since neutrals and digits are not strongly directional, thus the direction must be resolved as LTR.
input with dir=auto, start with N+EN+R When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Hebrew letter Alef since neutrals and digits are not strongly directional, thus the direction must be resolved as RTL.
input with dir=auto, all N+EN When dir='auto', the direction of an input element is set according to the first strong character of its value, or to LTR if there is no such character. In this test, there is no strongly directional character in the value, thus the direction must be resolved as LTR.
input with dir=auto, start with N+L When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Latin letter A since neutrals are not strongly directional, thus the direction must be resolved as LTR.
input with dir=auto, start with N+R When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Hebrew letter Alef since neutrals are not strongly directional, thus the direction must be resolved as RTL.

Scripted tests

Assertion Firefox Chrome Safari Opera IE Detailed results
input with dir=auto, script assigns to start with EN+L When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Latin letter A since digits are not strongly directional, thus the direction must be resolved as LTR.
input with dir=auto, script assigns to start with EN+R When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Hebrew letter Alef since digits are not strongly directional, thus the direction must be resolved as RTL.
input with dir=auto, script assigns to start with L When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Latin letter A, thus the direction must be resolved as LTR.
input with dir=auto, script assigns to start with N+EN+L When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Latin letter A since neutrals and digits are not strongly directional, thus the direction must be resolved as LTR.
input with dir=auto, script assigns to start with N+EN+R When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Hebrew letter Alef since neutrals and digits are not strongly directional, thus the direction must be resolved as RTL.
input with dir=auto, script assigns to all N+EN When dir='auto', the direction of an input element is set according to the first strong character of its value, or to LTR if there is no such character. In this test, there is no strongly directional character in the value, thus the direction must be resolved as LTR.
input with dir=auto, script assigns to start with N+L When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Latin letter A since neutrals are not strongly directional, thus the direction must be resolved as LTR.
input with dir=auto, script assigns to start with N+R When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Hebrew letter Alef since neutrals are not strongly directional, thus the direction must be resolved as RTL.
input with dir=auto, script assigns to start with R When dir='auto', the direction of an input element is set according to the first strong character of its value. In this test, it is the Hebrew letter Alef, thus the direction must be resolved as RTL.

bdi

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

The bdi element isolates text from its surrounding content for the purposes of the Unicode Bidirectional Algorithm, and automatically sets the value of the dir attribute if none is explicity set.

Only Firefox and Chrome support bdi among the browsers tested. One of the advanced tests fails in Chrome, and 4 in Firefox.

Internet Explorer, Safari and Opera do not support bdi.

Basic tests

Assertion Firefox Chrome Safari Opera IE Detailed results
bdi has dir=auto by default The dir global attribute defaults to auto on this element (it never inherits from the parent element like with other elements).
BDI: neutral to following number For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.

Other tests

Assertion Firefox Chrome Safari Opera IE Detailed results
BDI: neutral when BR 'For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.' Thus, a BDI containing a BR (which serves as a paragraph break in the content of the BDI) must not serve as a paragraph break in the content around the BDI.
BDI: neutral when contains LRO or RLO without PDF For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER. Thus, if a BDI contains LRO or RLO characters lacking a matching PDF, these must not affect the visual ordering of the content outside the BDI.
BDI: neutral when nested For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER. This must apply when a BDI is nested within a BDI.
BDI: neutral when number 'For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.'
BDI: paragraph-level container For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER. Thus, under no circumstances should any part of the content outside a BDI be visually reordered inside the BDI's content.
BDI: neutral to following letter For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.
BDI: neutral to immediately following letter For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.
BDI: neutral to preceding letter For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.
BDI: neutral to immediately preceding letter 'For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.'
BDI: neutral to immediately following number 'For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.'
BDI: neutral to surrounding letters 'For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.' Thus, regardless of its content and its dir attribute (if any), a BDI will not prevent a strongly RTL (or LTR) character preceding it from forming a single directional run with another strongly RTL (LTR) character following it.
BDI: neutral when wrapped For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER. Obviously, this should hold even if the BDI's content is wrapped over more than one line. A single character (U+FFFC or otherwise) obviously never gets wrapped over more than one line, but we still expect the part of the content preceding the BDI, if any, that is displayed on the same line as some part of the BDI to be ordered the same as it would be if that part of the BDI were replaced with U+FFFC. Similarly, we expect the part of the content following the BDI, if any, that is displayed on the same line as some part of the BDI to be ordered the same as it would be if that part
BDI: paragraph-level container For the purposes of applying the bidirectional algorithm to the contents of a bdi element, user agents must treat the element as a paragraph-level container. Thus, under no circumstances should the content outside a BDI affect the visual ordering of the BDI's content.
BDI: neutral to another BDI 'For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.' Thus, when a BDIs contains text of the same strong direction as another BDI following it, the two must not form a directional run as would be the case if the BDIs were just SPANs.
BDI: neutral to another immediately following BDI 'For the purposes of applying the bidirectional algorithm to the paragraph-level container that a bdi element finds itself within, the bdi element must be treated like a U+FFFC OBJECT REPLACEMENT CHARACTER.' Thus, when a BDIs contains text of the same strong direction as another BDI following it, the two must not form a directional run as would be the case if the BDIs were just SPANs, even if the two BDIs are not separated by anything at all.

pre and dir=auto

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

Of the browsers tested, only Firefox aligns the text on a paragraph by paragraph basis according to the first strong character in the paragraph and also assigns base direction on a line by line basis.

Chrome applies base direction on a paragraph by paragraph basis, but the alignment is determined by the first strong character in the pre element, rather than at the start of each paragraph. Safari also bases the alignment on the first strong character in the pre, but doesn't vary the base direction on a line by line basis.

Internet Explorer and Opera both fail to either assign base direction or align according to the content of the pre element at all. Alignment and base direction are those of the surrounding context.

Assertion Firefox Chrome Safari Opera IE Detailed results
dir=auto, pre, paragraph by paragraph When dir='auto', the direction is set according to the first strong character of the text. For pre elements, the heuristic is applied on a per-paragraph level.
pre with dir=auto, mixed L and R paragraphs When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level.
pre with dir=auto, all N+EN When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level. If there is no strong character, as in this test, the direction defaults to LTR.
pre with dir=auto, all-N between all-Rs When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level. If there is no strong character, as in this test, the direction defaults to LTR.

textarea and dir=auto

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

The results for textarea are the same as those for pre, see above.

Assertion Firefox Chrome Safari Opera IE Detailed results
dir=auto, textarea, paragraph by paragraph [Exploratory] When dir='auto', the direction is set according to the first strong character of the text. For textarea elements, the heuristic is applied on a per-paragraph level. The alignment of the line will vary with the direction.
textarea with dir=auto, mixed L and R paragraphs When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level.
textarea with dir=auto, all N+EN When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level. If there is no strong character, as in this test, the direction defaults to LTR.
textarea with dir=auto, script assigns to mixed L and R paragraphs When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level.
textarea with dir=auto, script assigns to all N+EN When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level. If there is no strong character, as in this test, the direction defaults to LTR.
textarea with dir=auto, all-N between all-Rs When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level. If there is no strong character, as in this test, the direction defaults to LTR.
textarea with dir=auto, script assigns to all-N between all-Rs When dir='auto', the direction is set according to the first strong character of the text. For textarea and pre elements, the heuristic is applied on a per-paragraph level. If there is no strong character, as in this test, the direction defaults to LTR.