Skip to content

Commit

Permalink
qa-html-dir: Various code fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
r12a committed Jun 28, 2021
1 parent b30f15c commit e090b51
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions questions/qa-html-dir.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
f.modifiers = ''; // people making substantive changes, and their affiliation
f.searchString = 'article-qa-html-dir'; // blog search string - usually the filename without extensions
f.firstPubDate = '2011-08-12'; // date of the first publication of the document (after review)
f.lastSubstUpdate = { date:'2021-05-07', time:'12:31'} // date and time of latest substantive changes to this document
f.lastSubstUpdate = { date:'2021-06-25', time:'12:31'} // date and time of latest substantive changes to this document
f.status = 'published'; // should be one of draft, review, published, or notreviewed
f.path = '../' // what you need to prepend to a URL to get to the /International directory

// AUTHORS AND TRANSLATORS should fill in these assignments:
f.thisVersion = { date:'2021-05-07', time:'12:31'} // date and time of latest edits to this document/translation
f.thisVersion = { date:'2021-06-25', time:'12:31'} // date and time of latest edits to this document/translation
f.contributors = 'Mati Allouche, Aharon Lanin, Norbert Lindenberg, Tomer Mahlin'; // people providing useful contributions or feedback during review or at other times
// also make sure that the lang attribute on the html tag is correct!

Expand All @@ -37,8 +37,6 @@
<script src="../javascript/doc-structure/article.js"> </script>
<script src="../javascript/articletoc-html5.js"></script>
<link rel="stylesheet" href="../style/article-2016.css" />
<link rel="copyright" href="#copyright"/>
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
</head>

<body>
Expand All @@ -48,7 +46,7 @@
<h1>Structural markup and right-to-left text in HTML</h1>
</header>

<section>
<div>
<div id="audience">
<!--p><span id="intendedAudience" class="leadin">Intended audience:</span>
XHTML/HTML coders (using editors or scripting), script developers (PHP, JSP, etc.), Web project managers, and anyone who needs to better understand how to markup up right-to-left text on a Web page.</p-->
Expand All @@ -57,7 +55,7 @@ <h1>Structural markup and right-to-left text in HTML</h1>
<p>This article looks at ways of handling text direction for <em>structural</em> markup in HTML, ie. at the document level and for elements like paragraphs, tables and forms. </p>
<p class="info">For handling <a href="https://w3c.github.io/i18n-glossary/#def_bidirectional_text" class="termref print">bidirectional text</a> with <em>inline</em> markup you should read the separate article, <cite><a class="print" href="/International/articles/inline-bidi-markup/">Inline markup and bidirectional text in HTML</a></cite>. It also describes some other elements and attributes related to direction.</p>
<p>The <code class="kw" translate="no">dir</code> attribute is used to set the base direction of text for display. It is essential to support languages that use right-to-left scripts such as Adlam, Arabic, Hebrew, N'Ko, Syriac, and Thaana. Many different languages are written with these scripts, including Arabic, Dhivehi, Hebrew, Mandinka, Pashto, Persian, Pular, Sindhi, Syriac, Urdu, Yiddish, etc.</p>
</section>
</div>


<section id="nutshell">
Expand Down Expand Up @@ -145,7 +143,7 @@ <h3>The <code class="kw" translate="no">title</code> element</h3>

<p>The text that appears in the <code class="kw" translate="no">title</code> element at the top of an HTML file is often displayed in tab headings, bookmarks, etc. When so displayed, the browser should automatically apply the base direction that the <code class="kw" translate="no">title</code> element had in the original document. For example, if the <code class="kw" translate="no">html</code> tag declares the document direction to be RTL, the <code class="kw" translate="no">title</code> element text should be displayed with a RTL base direction.</p>
<p>At the time of writing, browsers tend to display RTL title text from right-to-left, and vice versa. However, they do this not by examining the direction applied to the text by the markup, but instead by finding the first strongly directional character in the title and assuming that that indicates the appropriate base direction.</p>
<p>Much of the time this will produce the desired result. However, if the title text in a RTL document begins with, say, an acronym in the Latin script, the order will be incorrect when the text is displayed (<a class="print" href="../../../i18n-tests/results/native-user-interfaces#windowheader" target="_blank">see some tests</a>).</p>
<p>Much of the time this will produce the desired result. However, if the title text in a RTL document begins with, say, an acronym in the Latin script, the order will be incorrect when the text is displayed (<a class="print" href="https://www.w3.org/International/i18n-tests/results/native-user-interfaces#windowheader" target="_blank">see some tests</a>).</p>
<p>A workaround for this scenario is to add <code>&amp;rlm;</code> at the beginning of the title text when it doesn't begin with a RTL character. This adds <span class="codepoint" translate="no"><span class="uname">U+200F RIGHT-TO-LEFT MARK</span></span> at the start, which is an invisible, strongly directional RTL character.</p>
<p>If you have a LTR text that begins with a strong RTL character, use <code>&amp;lrm;</code> at the start, instead.</p>
</section>
Expand Down Expand Up @@ -190,9 +188,10 @@ <h3 id="basicmarkup"><a href="#basicmarkup">Only use markup for special circumst
</figure>
</section>

<style>x { align-content: }

</style>




<section>
<h3 id="alignment"><a href="#alignment">Using logical properties in CSS</a></h3>
Expand Down Expand Up @@ -229,7 +228,10 @@ <h3 id="alignment"><a href="#alignment">Using logical properties in CSS</a></h3>
</ul>
</section>

<section> </section>




<section>
<h3 id="tables"><a href="#tables">Working with tables</a></h3>
<p>The <span class="kw">dir</span> attribute setting also affects the flow of columns in a table. The following picture shows a table in a
Expand Down Expand Up @@ -407,7 +409,6 @@ <h2 id="endlinks"><a href="#endlinks">Further reading</a></h2>
<p>Related links, <cite>Authoring HTML &amp; CSS</cite></p>
<ul>
<li><a href="/International/techniques/authoring-html#direction">Text direction</a></li>
<li><a href="/International/techniques/authoring-html#bidilocn">Making bidi localization easier</a></li>
<li><a href="/International/techniques/authoring-html#using">Setting up a right-to-left page</a></li>
<li><a href="/International/techniques/authoring-html#blocks">Changing the direction of a block element</a></li>
</ul>
Expand Down

0 comments on commit e090b51

Please sign in to comment.