Re: directionality of a notification

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.

 -John

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