Skip to content

Commit

Permalink
Editorial: Less specific description for dir auto
Browse files Browse the repository at this point in the history
  • Loading branch information
christianliebel committed Jun 16, 2024
1 parent de3dcc6 commit a025ec5
Showing 1 changed file with 8 additions and 34 deletions.
42 changes: 8 additions & 34 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -446,9 +446,9 @@ <h3>
</h3>
<p>
The [=manifest's=] <code><dfn data-export="" data-dfn-for=
"manifest">dir</dfn></code> member specifies the <dfn>base
direction</dfn> for the <a>localizable members</a> of the
<a>manifest</a>. The [=manifest/dir=] member's value can be set to a
"manifest">dir</dfn></code> member specifies the string direction for
the <a>localizable members</a> of the <a>manifest</a>. The
[=manifest/dir=] member's value can be set to a
<a>text-direction</a>.
</p>
<p>
Expand Down Expand Up @@ -487,43 +487,16 @@ <h3>
"<dfn data-dfn-for="text-direction">auto</dfn>" (default)
</dt>
<dd>
<p>
Direction determined from content using <a data-cite=
"UAX9#P2">Rule P2</a> of the [[UAX9]] algorithm.
</p>
<aside class="note">
<p>
[=text-direction/auto=] means that the directionality of each
member is determined by its first strongly directional
character (as per the <a data-cite="UAX9#P2">Rule P2</a>). An
explicit direction value such as "[=text-direction/rtl=]" or
"[=text-direction/ltr=]" is preferred to relying on the default
of "[=text-direction/auto=]".
</p>
</aside>
The user agent SHOULD use heuristics, preferably based on the
Unicode Standard's first-strong detection algorithm, to detect the
base direction of a string.
</dd>
</dl>
<p>
The <dfn>text-direction list</dfn> is the [=list=] «
"[=text-direction/ltr=]", "[=text-direction/rtl=]",
"[=text-direction/auto=]" ».
</p>
<p>
When displaying the <a>localizable members</a> to an end-user, the
use agent SHOULD:
</p>
<ol class="algorithm">
<li>If the <a>base direction</a> is [=text-direction/ltr=] or
[=text-direction/rtl=], override <a data-cite="UAX9#P3">Rule P3</a>
of [[UAX9]], setting the paragraph embedding level to 0 if the
<a>base direction</a> is [=text-direction/ltr=], or 1 if the <a>base
direction</a> is [=text-direction/rtl=].
</li>
<li>Otherwise the <a>base direction</a> is "[=text-direction/auto=]",
in which case determine the text's direction by applying
<a data-cite="UAX9#P1">Rule P1</a> of [[UAX9]].
</li>
</ol>
<p>
To <dfn>process the `dir` member</dfn>, given [=ordered map=]
|json:ordered map| and [=ordered map=] |manifest:ordered map|:
Expand All @@ -549,7 +522,8 @@ <h3>
The [=manifest's=] <code><dfn data-export="" data-dfn-for=
"manifest">lang</dfn></code> member is a [=string=] in the form of a
[=language tag=] that specifies the language for the values of the
manifest's [=localizable members=].
manifest's [=localizable members=]. If the `lang` member is not
specified, the language is treated as unknown.
</p>
<p class="note">
Specifying the language improves the user experience by helping
Expand Down

0 comments on commit a025ec5

Please sign in to comment.