OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <meta charset="utf-8" /> |
| 5 <title>HTML Test: textarea with dir=auto, all-N between all-Rs</title> |
| 6 <link rel="reference" href="dir_auto-textarea-N-between-Rs-ref.html" /> |
| 7 <link rel="author" title="Aharon Lanin" href="mailto:aharon@google.com" /> |
| 8 <link rel="author" title="HTML5 bidi test WG" href="mailto:html5bidi@googleg
roups.com" /> |
| 9 <link rel="help" href="http://dev.w3.org/html5/spec/Overview.html#the-dir-at
tribute" /> |
| 10 <link rel="help" href="http://dev.w3.org/csswg/css3-writing-modes/#unicode-b
idi0" /> |
| 11 <meta name="assert" content=" |
| 12 When dir='auto', the direction is set according to the first strong charac
ter |
| 13 of the text. |
| 14 For textarea and pre elements, the heuristic is applied on a per-paragraph
level. |
| 15 If there is no strong character, as in this test, the direction defaults t
o LTR." /> |
| 16 <style> |
| 17 body, textarea { |
| 18 font-size:18px; |
| 19 text-align:left; |
| 20 } |
| 21 .test { |
| 22 border: medium solid gray; |
| 23 width: 400px; |
| 24 margin: 20px; |
| 25 } |
| 26 .comments { |
| 27 display: none; |
| 28 } |
| 29 </style> |
| 30 </head> |
| 31 <body> |
| 32 <div class="instructions"><p>Test passes if the two boxes below look exactly
the same.</p></div> |
| 33 <div class="comments"> |
| 34 Key to entities used below: |
| 35 א - The Hebrew letter Alef (strongly RTL). |
| 36 We use text-align:left because neither the dir="auto" nor the unicode-bidi
:plaintext |
| 37 specification states whether text-align:start and text-align:end should ob
ey the paragraph |
| 38 direction or the direction property in a unicode-bidi:plaintext element. |
| 39 The ...! paragraph, being neutral, is supposed to be displayed LTR (i.e. a
s ...!, not as !...) |
| 40 despite both the paragraph before it and the paragraph after it being all-
RTL, which makes the |
| 41 element as a whole RTL. |
| 42 </div> |
| 43 <div class="test"> |
| 44 <div dir="ltr"> |
| 45 <textarea rows="4" dir="auto"> |
| 46 א |
| 47 ...! |
| 48 א |
| 49 </textarea> |
| 50 </div> |
| 51 <div dir="rtl"> |
| 52 <textarea rows="4" dir="auto"> |
| 53 א |
| 54 ...! |
| 55 א |
| 56 </textarea> |
| 57 </div> |
| 58 </div> |
| 59 </body> |
| 60 </html> |
OLD | NEW |