W3C home > Mailing lists > Public > public-xformsusers@w3.org > November 2016

Re: "Focus"

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Tue, 01 Nov 2016 19:29:31 +0100
To: "Philip Fennell" <Philip.Fennell@marklogic.com>, "Erik Bruchez" <ebruchez@orbeon.com>
Cc: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
Message-ID: <op.yp9hnhi5smjzpq@steven-aspire-s7>
On Tue, 01 Nov 2016 17:33:28 +0100, Erik Bruchez <ebruchez@orbeon.com>  
wrote:

> Yes it's XPath 2 terminology: [1]
>
>    "[Definition: The first three components of the dynamic context  
> (context item, context position, and context size) are called the focus  
> of >the expression. ] The focus enables the processor to keep track of  
> which items are being processed by the expression."
>
> So we have:
>
> - focus for the purpose of XPath evaluation
> - focus on a UI control
>
> The current HTML spec says this: [2]
>
>    "When interacting with an interface using a keyboard, key input is  
> channeled from the system, through the hierarchy of interactive widgets,  
> >to an active widget, which is said to be focused."
>
> Maybe we could disambiguate by using "keyboard focus", as it is related  
> to the keyboard and matters for keyboard input (that's also the approach  
> >we took in our documentation [3]), and try to not use focus in relation  
> to XPath evaluation?

I would honestly prefer to do it the other way round, since we use 'focus'  
everywhere for control focus, from setfocus to DOMFocusIn, and so on,  
whilst we hardly ever refer to the XPath focus.

Steven

>
> -Erik
>
> [1] https://www.w3.org/TR/xpath20/#dt-dynamic-context
> [2]  
> https://html.spec.whatwg.org/multipage/interaction.html#introduction-7
> [3] https://doc.orbeon.com/xforms/focus.html
>
> On Tue, Nov 1, 2016 at 8:20 AM, Philip Fennell  
> <Philip.Fennell@marklogic.com> wrote:
>> Hello Steven,
>>
>> I don’t recall ever using or seeing used the term ‘focus’ in an XPath  
>> context. Only in the context of UI.
>>
>>
>>>> Philip
>>
>> On 01/11/2016 14:23, "Steven Pemberton" <steven.pemberton@cwi.nl> wrote:
>>
>>    The spec uses the word 'focus' in two different ways:
>>
>>    1. In evaluation contexts:
>>    https://www.w3.org/community/xformsusers/wiki/XForms_2.0#Maintaining_Position:_the_Focus
>>
>>    "The evaluation context consists of at least the focus, the  
>> variables in
>>    scope and the available functions."
>>
>>    "The focus consists of the context item, position and size "
>>
>>    2. For the control that interaction is directed to.
>>
>>    Not actually defined anywhere (which I shall fix), but used all over  
>> the
>>    place.
>>
>>    E.g. "Changing the focus to a form control within a repeat object may
>>    cause one or more repeat index values to be changed"
>>
>>    This needs to be fixed.
>>
>>    Is there any technical reason that we use "focus" in the first case?  
>> (Is
>>    it an XPath technical term that we are required to use?)
>>
>>    Steven
Received on Tuesday, 1 November 2016 18:30:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 November 2016 18:30:15 UTC