[whatwg] New suggestion for mutually exclusive sections in WF2
Matthew Raymond
mattraymond at earthlink.net
Sun Oct 17 20:00:04 PDT 2004
Okay, let's look at this closely. Let's create three examples, the
first using the WA1 draft markup, one using my suggested modifications
to the draft, one using your markup, and an XUL example. First, your a
simplified version of your example:
| <form id='dessertform'>
| <input type='radio' name='dessert' value='icecream' id='i'>
| <label for='i'>Vanilla Ice Cream</label>
|
| <fieldset qwe='i'>
| ...Contents...
| </fieldset>
|
| <input type='radio' name='dessert' value='cake' id='c'>
| <label for='c'>Chocolate Cake</label>
|
| <fieldset qwe='c'>
| ...Contents...
| </fieldset>
| </form>
Next, the WA1 draft version:
| <tabbox>
| <fieldset>
| <legend>Vanilla Ice Cream</legend>
| ...Contents...
| </fieldset>
| <fieldset>
| <legend>Chocolate Cake</legend>
| ...Contents...
| </fieldset>
| </tabbox>
Much simpler, and much easier to follow. Now my version:
| <tabbox>
| <tablabel for="i">Vanilla Ice Cream</tablabel>
| <tablabel for="c">Chocolate Cake</tablabel>
|
| <fieldset id="i">
| ...Contents...
| </fieldset>
| <fieldset id="c">
| ...Contents...
| </fieldset>
| </tabbox>
My version is slightly more complicated, but it's more flexible.
(Actually, the previous example would still work with my suggested
revisions.)
Now, look at XUL:
| <tabbox>
| <tabs>
| <tab label="Vanilla Ice Cream"/>
| <tab label="Chocolate Cake"/>
| </tabs>
|
| <tabpanels>
| <tabpanel id="i">
| ...Contents...
| </tabpanel>
| <tabpanel id="c">
| ...Contents...
| </tabpanel>
| </tabpanels>
| </tabbox>
It's structurally similar to my example, but more complicated and
without the direct semantic association between the tab and the tab panel.
I think I understand what you're trying to do with your markup. The
radio buttons or check boxes allow the user of a legacy browser to
select the section they want to work with. The problem with this is that
there's no point. Tabs aren't for selecting what section is processed.
They're merely a way of limiting what section is displayed.
What's more, your system would require <form> elements to be used as
containers for tabs. This would make it impossible to have a <form> on
each tab.
Bottom line: Your system is more complicated, more difficult to
read, and provides no real benefit over the WA1 draft spec, both for
functionality and legacy content.
More information about the whatwg
mailing list