W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2011

[whatwg] tabindexscope

From: Ojan Vafai <ojan@chromium.org>
Date: Tue, 8 Nov 2011 11:07:04 -0800
Message-ID: <CANMdWTu3NBswmNMExVkNFhp8K2hdgDLDqZ0o9+g9KCsk=4Ofiw@mail.gmail.com>
We keep running into the use case where the physical position matters for
the tab order. The problem with just setting tabIndex (or CSS3 tab-index)
is that it takes the thing out of the natural order.

This problem comes up in a lot of places (e.g. absolute positioning). It's
recently come up for CSS flexboxes, e.g. if you set flex-order or a reverse
flow, then the tabindex still being in document order is often not what the
author wants (https://bugs.webkit.org/show_bug.cgi?id=62664).

<button tabindex=0>A</button>
<div tabindex=2 tabindexscope>
<button tabindex=2>C</button>
<button tabindex=1>B</button>
<button tabindex=1>D</button>

The order for the tabbing would be A-D-B-C.

Received on Tuesday, 8 November 2011 11:07:04 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:37 UTC