Unobtrusive and keyboard accessible connected select boxes
Any web developer who has created a reasonably complex form is probably aware of the concept of multiple
select elements that are connected – choosing something from one select box either makes a new select box appear or changes the options of one that is already visible.
I normally work around these problems by requiring users to submit the form to get the next set of options from the server. Obviously that isn’t an ideal solution either. So what other options do we have? One option that looks promising is described by Christian Heilmann in Unobtrusive connected select boxes - yet another solution approach. It involves using
The solution Chris describes solves (or at least mitigates) the keyboard access problem since it doesn’t reload the page when the
The catch is that nested
optgroup elements are not allowed in current versions of HTML, so this will not work when more than two connected select boxes are needed. Nested
optgroup elements are allowed in the current Web Forms 2.0 Working Draft, so I guess there is a reasonable chance of that change making it into HTML 5.
Subscribe / follow
DreamHost web hosting
Use the promo code 456BEREASTREET3 to save USD 20 when you sign up for DreamHost