Re: Request for Comments: Pointer Events spec's touch-action CSS property

On Tuesday 2013-01-15 09:24 -0500, Arthur Barstow wrote:
> On January 15, the PointerEvents WG (PEWG) published a Working Draft
> of the PointerEvents spec:
> 
> <http://www.w3.org/TR/2013/WD-pointerevents-20130115/>
> 
> Given this spec defines a "touch-action" CSS property, PEWG
> especially welcomes comments on this property (as well as any other
> part of the spec):
> 
> <http://www.w3.org/TR/2013/WD-pointerevents-20130115/#the-touch-action-css-property>

A few comments (though (2) is really a question rather than a
comment):

 (1) It's not clear why this property is restricted to only
 block-level elements and SVG elements.  What led to that
 restriction?  I don't see any reason it shouldn't apply to all
 elements (which should be the default for new properties unless
 there's a reason to do otherwise).

 (2) I'm guessing that the rationale for making the property
 Inherited:no and then specifying:
   # The touch behavior is then performed on the nearest ancestor
   # element that is capable of that behavior, unless an
   # intermediate ancestor element specifies that the behavior is
   # not permitted.
 is so that the property doesn't inherit across a container that is
 zoomable, pannable, or such?  That is, so that:
 <div id="a" style="touch-action: none">
   <div id="b" style="overflow: scroll">
     <div id="c">What the user is touching</div>
   </div>
 </div>
 doesn't lead to the gestures being suppressed, if one assumes that
 the relevant touch behaviors can apply to the div with id="b".

 Is my assumption correct here?

 (3) The definitions of the 'auto' and 'none' values appear to
 contradict the sentence quoted above in point (2).  So, perhaps,
 does the sentence immediately preceding that quoted sentence.  If
 the processing model really is governed by the sentence I quoted
 (which I think does make sense if the property is not inherited by
 default), then the rest of the text describing the property also
 ought to describe that processing model of looking to see if there
 is a 'none' anywhere between the element receiving the event and
 the element capable of the behavior.

 (4) The spec should be clearer about the boundary conditions:  in
 particular, what happens when the 'touch-action:none' is on the
 element capable of the behavior (rather than something a descendant
 of it that is an ancestor of (or is) the element touched).

 (5) Naming:  I'm not all that happy with the 'touch-action' name,
 though I'm not entirely sure why.  Maybe it's that "action" seems
 like an odd term to use in this context; it doesn't feel either
 like a strictly-correct technical term or a clear English term for
 what these are.  I don't have any better ideas right now, though.

 (6) The specification shouldn't define the inherit value in the dl
 describing the meanings of the values, and probably (in reference
 to css3-values) shouldn't list it in the "Value:" line either.  See
 http://dev.w3.org/csswg/css3-values/#component-types , which has
 this prose:
   # All CSS properties also accept the CSS-wide keyword values
   # ‘inherit’ and ‘initial’ as the sole component of their property
   # value. For readability these are not listed explicitly in the
   # property value syntax definitions. For example, the full value
   # definition of ‘border-color’ is ‘[ <color>{1,4} ] | inherit |
   # initial’ (even though it is listed as ‘<color>{1,4}’). 
 not present in http://www.w3.org/TR/CSS21/about.html#value-defs .

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Wednesday, 16 January 2013 16:23:12 UTC