W3C home > Mailing lists > Public > public-web-notification@w3.org > December 2011

Re: directionality of a notification

From: John Gregg <johnnyg@google.com>
Date: Thu, 22 Dec 2011 17:28:12 -0800
Message-ID: <CAEd9o4SqxqwVFKg1DVwwOVN4Q_Pu105bd+XqjRp5gxgciP7vbQ@mail.gmail.com>
To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
Cc: Web Notification WG <public-web-notification@w3.org>, ML publc-i18n-bidi <public-i18n-bidi@w3.org>
On Thu, Dec 22, 2011 at 10:21 AM, Kang-Hao (Kenny) Lu <
kennyluck@csail.mit.edu> wrote:

> I have three pieces of feedback regarding the Directionality section[1]
> 1. When the dir attribute of a notification is in "inheriting
> state"(i.e. dir="auto" currently) and the notification is called from a
> Web Worker, the resulting directionality is now always 'ltr'. Is that
> intentional and desirable? If not, I suppose we use the directionality
> of the root element (or the body element, whatever is better), if
> exists, of the calling script's document (or the script's document's
> browsing context's active document, whatever is better) as the inherited
> directionality.

Using 'ltr' when there is a non-document context is essentially a fall back
case when the context doesn't provide an obvious answer.  In the shared
worker situation I think it's particularly difficult to establish a
surrounding directionality, and would think authors would prefer being
explicit in that case.  We could improve things somewhat in the dedicated
worker situation where the script can be unambiguously connected to a
document which would be the logical directionality to inherit.

> 2. The "auto" value conflicts semantically with the @dir content
> attribute in HTML, which uses the first strong algorithm. I propose we
> use the empty string to identify the "inheriting state", and potentially
> a new "auto" value to identify the "first strong state". In this state,
> the UA would apply the first strong algorithm to the content of the
> notification to determine the directionality used.

The intent is to match what HTML does -- earlier versions of the spec tried
to indicate that the notifications "dir" attribute follows all HTML rules.

So I'm fine with changing it so that "auto" applies that same algorithm and
a missing value implies inherit the way it's written now.  I don't think it
needs to be an empty string explicitly.

> 3. What should be the default value of Notification's dir value? My
> guess is the "inheriting state" instead of the "first strong state" but
> the bidi folks would know better.

Yes, that's what the HTML algorithm specifies according to my reading, and
I would agree.

Received on Friday, 23 December 2011 01:28:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:53:13 UTC