bidi-alt-001

unicode-bidi: bidi-override in alt text

WeasyPrint

This browser

Assertion
If alt text is not treated as replaced content, then unicode-bidi applies to image alt text.

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3   <head>
 4     <title>CSS Test: unicode-bidi: bidi-override in alt text</title>
 5     <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
 6     <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact">
 7     <link rel="help" href="http://www.w3.org/TR/CSS21/visuren.html#direction">
 8     <meta name="assert" content="If alt text is not treated as replaced content, then unicode-bidi applies to image alt text.">
 9     <style type="text/css">
10       .rtol {
11         direction: rtl;
12         unicode-bidi: bidi-override;
13       }
14       img {
15         color:blue;
16         width: 0; /* If alt text is treated as replaced content, then this makes it invisible. */
17                   /* (The rendering of replaced content is out-of-scope for CSS.) */
18         display: inline;
19       }
20     </style>
21   </head>
22   
23   <body>
24     
25     <p>The three lines below should be <strong>identical</strong>.</p>
26     
27     <p>Three lines of <img src="" alt="readable" width="0"> text</p>
28     <p>Three lines of <span class="rtol"><img src="" alt="elbadaer" width="0"></span> text</p>
29     <p>Three lines of <img src="" alt="elbadaer" class="rtol" width="0"> text</p>
30 
31   </body>
32 </html>