W3C home > Mailing lists > Public > www-style@w3.org > October 2012

Re: [css3-ui] nav-index <number> value

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 18 Oct 2012 10:24:36 -0700
Message-ID: <CAAWBYDCMRkZBgC5DQLXK-jH15x8fHiy9Hb-W=Zj7JDFU9ORg=A@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Yves Lafon <ylafon@w3.org>, "www-style@w3.org" <www-style@w3.org>
On Thu, Oct 18, 2012 at 7:40 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Oct 17, 2012, at 9:57 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>> On Wed, Oct 17, 2012 at 2:01 AM, Yves Lafon <ylafon@w3.org> wrote:
>>> in [1], it says:
>>> nav-index: auto | <number> | inherit
>>> Then
>>> <<
>>> <number>
>>>    The number (which is non-zero and positive) indicates the sequential
>>>    navigation order for the element. '1' means first. Elements with the
>>>    same nav-index value are navigated in document order when that
>>>    nav-index value is being navigated.
>>> If the first number non-zero and positive is '1', then the value is probably
>>> <integer> and not a <number>.
>>> Cheers,
>>> [1] http://www.w3.org/TR/2012/WD-css3-ui-20120117/#nav-index0
>> Yup, you're right.
> It would be better for authors if decimals could be used. So if there was already a 'nav-index:1' and a a 'nav-index:2', something could be inserted between them in the tab order with a 'nav-index:1.5'. Or before the first one with a 'nav-index:0.5'.

I agree, actually.  However, then we should modify more of the
property.  We can't make it "positive numbers", because that's an open
range, and we avoid those when possible.  There's a legitimate reason,
for this property, to keep a "non-negative" restriction, though -
ideally, you shouldn't have to scan the entire document to find out
what the first element in tab order is, at least in the common case.
So, having a minimum value (either 0 or 1) that's the default makes it
possible to just jump to the first element with that value.  It's
unfortunate that this means you can't put an element in front without
moving *all* the other elements, but that's a tradeoff.

Received on Thursday, 18 October 2012 17:25:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:22 UTC