Behaviour SwRS-MDOKFSTUDIO-CORE-041
Right-to-left text aligns to the right and blocks get an automatic direction
When a paragraph, heading, list item, block quote or table cell holds text, the extension SHALL give it `dir="auto"` when it has no dir attribute and keep an author's dir attribute only as ltr, rtl or auto, so that Hebrew or Arabic text aligns to the right edge of the column.
Step 1 of path 2 in StRS-MDOKFSTUDIO-CORE-001: from “The preview shows the unsaved text” to “Right-to-left text is aligned to the right”.
Scenarios 3
The situations the tests check; open one to read it.
nominalText direction of a paragraph
Givena Hebrew paragraph, then an English paragraph
Whenthey are shown
Thenthe Hebrew text ends at the right edge of the column
the English text starts at the left edge
the English text starts at the left edge
nominalBlock elements without a dir attribute
| Input | Outcome |
|---|---|
| a heading, a paragraph, a list item, a block quote, a table header cell and a table data cell without dir | each carries dir auto |
| a div without dir | gets no dir attribute |
refusalAuthor dir attribute
| Input | Outcome |
|---|---|
| paragraphs with dir rtl and dir RTL with a trailing space | both read dir rtl (lower case, without spaces) |
| a paragraph with dir evil | the attribute is gone and the diagnostic blocked-dir is recorded |