W3C home > Mailing lists > Public > www-international@w3.org > January to March 2014

Re: [inline bidi update] - Some comments

From: Aharon (Vladimir) Lanin <aharon@google.com>
Date: Mon, 24 Feb 2014 13:01:19 +0200
Message-ID: <CA+FsOYbJWCqnk1bkvo2HDnZEPvLdp+vwRD=FQQK17m-FMovEzQ@mail.gmail.com>
To: Lina Kemmel <LKEMMEL@il.ibm.com>
Cc: Richard Ishida <ishida@w3.org>, "www-international@w3.org" <www-international@w3.org>
This is not a very good example because what the document says will be
inserted as a single phrase, with a single span around it. Thus, the
mark-up one would expect for this example is either:

   <span dir=ltr>Open: c:\myfile.txt</span>

Or, at most:

   <span dir=ltr>Open: <span dir=ltr>c:\myfile.txt</span></span>

Both would work with isolation.

A better example for your objection would be:

<p dir="rtl">
NAME: <span dir="ltr">john</span> <span dir="ltr">doe</span>

This might be the result when the first and last names of a person are
stored as separate fields in a database. One certainly wants to get "john
doe", but isolation would result in "doe john".

We claim that using the markup above is not a good practice anyway, even
though it may have worked up to now. If the overall direction of the name
as a whole is important, and it is, it should be declared explicitly, e.g.:

<p dir="rtl">
NAME: <span dir="ltr">john doe</span>

Note that the "let it stick" approach does not work once we introduce
nicknames into the equation, and allow nicknames to be in a different
script than the first and last names:

<p dir="rtl">
NAME: <span dir="ltr">john</span> "YOHANAN" <span dir="ltr">doe</span>

will display (with or without isolation) as

doe "NANAHOY" john :EMAN

not as the more desirable

john "NANAHOY" doe :EMAN

The right markup to get the more desirable output has to be

<p dir="rtl">
NAME: <span dir="ltr">john <span dir="rtl>"YOHANAN"</span> doe</span>

regardless of isolation.

On Mon, Feb 10, 2014 at 6:48 PM, Lina Kemmel <LKEMMEL@il.ibm.com> wrote:

> Hi Richard,
> I think that directional embedding (without isolation) can
> make sense when, for example, several opposite-direction
> phrases are supplied by different content providers, but
> actually form a single phrase.
> <p dir=rtl>THE DOCUMENT SAYS:
>    <span dir=ltr>Open: </span>
>    <span dir=ltr>c:\myfile.txt</span>
> </p>
> The display in this case is expected to be:
>    Open: c:\myfile.txt :SYAS TNEMUCOD EHT
> However, when dir creates an isolation and each span as a
> whole is treated by the containing paragraph like an object
> replacement character, the display would be:
>    c:\myfile.txtOpen:  :SYAS TNEMUCOD EHT
> Regards,
> Lina
Received on Monday, 24 February 2014 11:02:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:04 UTC