I know definition lists are nice, but... heck are a pita to deal with in javascript!
You always need two ids or rely on parent and then prev/next, I'm not a javascript expert, but I don't like that much either solutions.
What do you think about get rid of them at least in the admin panel in 1.1?
It would be cool if each pair setting/description was contained into a single container, something like:
<div class="setting" id="this_setting_box">
<label for="this_setting" class="definition">This setting is</label>
<span class="value"><input id="this_setting" name="this_setting" /></span>
</div>
Dunno if it make sense in terms of styling, semantics, accessibility, etc., ence the question/proposal :-[
Also, it would help in other ways: easier error/success handling (at the moment we don't have it, but I'd like to have something for 1.1, and with that it would be enough a single class on the container), it would allow to use the target selector to highlight settings when using the search, maybe something else.
Thoughts?
Mixed feelings regarding semantic html. That was IIRC the reason I converted the old tables from the core theme to definition lists in curve.
It would be nice for the js, I don't necessarily mind the .parent .prev .next stuff, then again when you see it in the JS you tend to have to go to the markup to understand why its doing that so you can trace what element its trying to find :P
Going to a div structure seems to me like we would be adding in a lot of divs, so I'm just wondering if there is another tag structure that may work for us? The dl dt dd stuff is easy to understand, so maybe there is some other semantic markup that would group things nicer for JS.
Yes, tables used for everything are a pain no matter what, I agree.
On the semantics I was reading a bit just now and TBH the arguments are not very persuasive (to me): the semantic of the form is given by the pair <label><input>, once a pair is defined give yet another pair <dt><dd> is a duplication and as such it may even be counter-productive:
http://html5doctor.com/the-dl-element/
http://webaim.org/discussion/mail_thread?thread=4960
http://webaim.org/techniques/formvalidation/
Not talking explicitly about <dl>s here, but forms and too much markup:
http://webaim.org/discussion/mail_thread?thread=4348
Not talking about forms here:
Definition lists suck to style. I use a ul with label and input. Then again, I use bootstrap which handles this pretty well.
<li class="setting" id="this_setting_box">
<label for="this_setting" class="definition">This setting is</label>
<input id="this_setting" name="this_setting">
</li>
Side note (feel free to split): why doesn't the preview show the code highlighting?
probably because of my "bad implementation" :P
I'll check it ;)