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

Re: "Focus"

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Tue, 1 Nov 2016 09:33:28 -0700
Message-ID: <CAAc0PEVmB4x1ymotxk3-vwXj57yexgwszsj4X54x2oc002XGmQ@mail.gmail.com>
To: Philip Fennell <Philip.Fennell@marklogic.com>
Cc: Steven Pemberton <steven.pemberton@cwi.nl>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>
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?

-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 16:34:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 November 2016 16:34:22 UTC