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 17:29:45 -0700
Message-ID: <CAAWBYDBwS5RKOzQ2NCTnDMj+C8u3SZqpoBbyVEfZHAirmptUag@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 5:26 PM, Brad Kemper <brad.kemper@gmail.com> wrote:
> On Oct 18, 2012, at 10:24 AM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote:
>>> 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.
>
> You have to scan the whole document anyway, to find out what the second element is. It might be 'nav-index:50000'. You don't need to know either one until someone tabs, Tab, and by that time you've likely assigned styles to all elements and know their tab order already anyway.

Not quite - you only need to resort to waiting for the rest of the
document when you run out of elements with the lowest value.  As long
as there are some of them left, you're good.

~TJ
Received on Friday, 19 October 2012 00:30:32 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:01 GMT