W3C home > Mailing lists > Public > www-style@w3.org > April 2009

Re: Tabbed Interfaces in CSS

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Sat, 25 Apr 2009 12:31:42 -0500
Message-ID: <dd0fbad0904251031x1bae4eb2q110297a05f72b949@mail.gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>
On Sat, Apr 25, 2009 at 8:15 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>
> On Apr 24, 2009, at 10:38 PM, Boris Zbarsky wrote:
>
>>> I'm fine with taking the easy way out.  Whenever radio-group changes, the
>>> element becomes un:checked.
>>
>> Which is the same as your proposed solution for the DOM changes above. I'd
>> be fine with this; it's nice and simple.
>>
>>> Some cursory thinking doesn't show this as causing any problems.  I
>>> basically want :checked to change *only* as a result of direct user
>>> interaction, not due to some crazy conflict-resolution rules.
>>
>> Right; those are the part of HTML radio behavior that really suck.
>
> It seems like it would be very useful to be able to use JavaScript to change
> which box is checked. Would this be possible, with say myElement.checked ?
> Or does that require going outside the CSS for the interface?

At worst, you just throw a click() event at the element, simulating
user interaction.  It's probably the easiest and most comprehensible
way to do it anyway.  ^_^

> And if it can be checked in JavaScript, are you saying that checking it,
> then inserting it into the DOM would uncheck it?

That's what I'm saying, yes.

> For non-radio group item, I think it reasonable to keep checked items
> checked.

If it didn't have a string value for radio-group, I would be fine with
this behavior (maintaining the :checked state).  However, I'm also
fine with just unilaterally removing :checked if it's too annoying in
implementation.  After all, you can't know if its in any radio groups
until after you've passed it through the CSS engine - that information
isn't stored in the element like it is for actual radio inputs.

You're already using javascript to insert the element; you can use it
to immediately activate the element as well.

~TJ
Received on Saturday, 25 April 2009 17:32:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:46:58 GMT