- From: Phillips, Addison <addison@lab126.com>
- Date: Tue, 14 Sep 2010 17:53:21 -0400
- To: Matitiahu Allouche <matial@il.ibm.com>, fantasai <fantasai.lists@inkedblade.net>
- CC: Adil Allawi <adil@diwan.com>, "Aharon (Vladimir) Lanin" <aharon@google.com>, Behdad Esfahbod <behdad@behdad.org>, Ehsan Akhgari <ehsan@mozilla.com>, "public-i18n-bidi@w3.org" <public-i18n-bidi@w3.org>, "public-i18n-bidi-request@w3.org" <public-i18n-bidi-request@w3.org>, Shachar Shemesh <shachar@shemesh.biz>
- Message-ID: <C7A5719F1E562149BA9171F58BEE2CA4129FFB33BC@EX-IAD6-B.ant.amazon.com>
I'm not sure I agree with limiting the attribute to <textarea> elements. It seems to me that bidi markup is already pretty complex. Adding attributes that are only available in special circumstances makes it a lot harder to tag and style documents consistently---more special cases are not necessarily better. [[ I'm going to call the attribute 'uba' below, although I agree with fantasai that this name is unnecessarily terse and opaque ]] So my suggestion in our WG call was basically: define 'uba' (or whatever) in general terms as "another value for attribute 'dir'". In most cases, 'uba' behaves the same as 'auto'. In some special cases (second paragraphs of a <textarea>) it can have special behavior. The behavior should be deterministic and should be described in terms that do not conflict with (e.g.) CSS selectors. I am not sure if this can be achieved. If it cannot, my tendency is to want to get rid of it if possible and recommend better markup or "active" solutions. Addison Phillips Globalization Architect (Lab126) Chair (W3C I18N, IETF IRI WGs) Internationalization is not a feature. It is an architecture. From: Matitiahu Allouche [mailto:matial@il.ibm.com] Sent: Tuesday, September 14, 2010 2:35 PM To: fantasai Cc: Phillips, Addison; Adil Allawi; Aharon (Vladimir) Lanin; Behdad Esfahbod; Ehsan Akhgari; public-i18n-bidi@w3.org; public-i18n-bidi-request@w3.org; Shachar Shemesh Subject: Re: per-paragraph auto-direction, a.k.a. dir=uba Fantasai wrote: "I suggest "plaintext" instead of "uba" because it's clearer what the behavior and the intended use case is. (Since we're only allowing uba on <textarea> and using dir=auto for first-strong, we don't need the name to be so cryptically short.)" The fact that we only tackle <textarea> now does not mean that the "uba/plaintext" behavior will never be used for other types of elements. Consequently, we should not choose terminology or syntax that would limit our freedom to extend this feature to other elements. This is said in general, I have no marked preference for "uba" versus "plaintext". I seem to recall that both terms were mentioned at the f2f, and "uba" was the one retained, but this is rather moot, since the final syntax and terminology will be selected by the HTML5 WG anyway. Shalom (Regards), Mati Bidi Architect Globalization Center Of Competency - Bidirectional Scripts IBM Israel Phone: +972 2 5888802 Fax: +972 2 5870333 Mobile: +972 52 2554160 From: fantasai <fantasai.lists@inkedblade.net> To: "Aharon (Vladimir) Lanin" <aharon@google.com> Cc: Matitiahu Allouche/Israel/IBM@IBMIL, "Phillips, Addison" <addison@lab126.com>, Adil Allawi <adil@diwan.com>, Behdad Esfahbod <behdad@behdad.org>, Ehsan Akhgari <ehsan@mozilla.com>, public-i18n-bidi@w3.org, public-i18n-bidi-request@w3.org, Shachar Shemesh <shachar@shemesh.biz> Date: 14/09/2010 20:55 Subject: Re: per-paragraph auto-direction, a.k.a. dir=uba ________________________________ On 09/14/2010 08:39 AM, Aharon (Vladimir) Lanin wrote: > I second Mati's proposal. As Ehsan has pointed out <textarea readonly> > can be used to display plain text (as opposed to edit it), even though > somewhat awkwardly. And if we work out a bigger proposal, we can tweak > the bugs filed on HTML5 and CSS3. Right now it is imperative to produce > a new draft of the proposal and file the bugs (October 1 deadline for > HTML5..., apparently). > > I do want to put dir=uba under the dir=auto umbrella, via > autodirmethod=first-strong|any-rtl|uba. autodirmethod inherits; dir does > not. The default would probably be first-strong. > > Is this agreeable to everyone? Please respond. > > Here is a quick spec for dir=auto: > > * Using dir=auto with autodirmethod=uba would (by default) set > unicode-bidi to "uba" and direction according to first-strong. > (Note that this includes leaving direction at the inherited value > if the content is neutral.) > * For elements other than <textarea>, unicode-bidi:uba is treated as > unicode-bidi:isolate. > * On <textarea>, unicode-bidi:uba means that: > o The UBA on the textarea content is invoked specifying only a > default paragraph level (in icu4j terminology, either > LEVEL_DEFAULT_LTR or LEVEL_DEFAULT_RTL), based on the the > element's own direction value as calculated above. (This > makes the all-neutral paragraphs use the same direction as > the first paragraph that is not all-neutral.) > o Each UBA paragraph's lines' alignment is determined by the > paragraph's resolved base level when the element's > text-align is start or end. This is too complicated. If uba cannot in fact be triggered on anything other than a <textarea>, then it should not be allowed on anything other than a <textarea>. I suggest having dir=ltr|rtl|auto|plaintext autodirmethod=first-strong|any-rtl I suggest "plaintext" instead of "uba" because it's clearer what the behavior and the intended use case is. (Since we're only allowing uba on <textarea> and using dir=auto for first-strong, we don't need the name to be so cryptically short.) > # The part of the text after the first X characters (where the text in > nodes excluded above are not part of the count). Do we need this? If > so, what's a good X value? 100? And I think that for any-rtl having an X value is both better for performance and more likely to give good results. If the first X characters are LTR, where X is longer than most LTR phrases commonly imported into RTL text, chances are any RTL characters after that are not indicating the paragraph's main direction. ~fantasai
Received on Tuesday, 14 September 2010 21:53:54 UTC