Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why are tabs using dl and dd? #4308

Closed
jurriaan opened this issue Feb 1, 2014 · 15 comments
Closed

Why are tabs using dl and dd? #4308

jurriaan opened this issue Feb 1, 2014 · 15 comments
Assignees
Milestone

Comments

@jurriaan
Copy link

jurriaan commented Feb 1, 2014

Is this a semantically correct way to do this?

The current HTML for tabs looks like this:

<dl class="tabs" data-tab>
  <dd class="active"><a href="#panel2-1">Tab 1</a></dd>
  <dd><a href="#panel2-2">Tab 2</a></dd>
  <dd><a href="#panel2-3">Tab 3</a></dd>
  <dd><a href="#panel2-4">Tab 4</a></dd>
</dl>
...

Is there a reason for using definitions for the tabs? To me this doesn't make much sense.

And also, according to the HTML specs a dl should contain zero of more of this:

one or more dt elements, followed by one or more dd elements

So it looks like it is invalid HTML

@natb19
Copy link

natb19 commented Feb 1, 2014

Yeh, I was wondering this to...

@voku
Copy link
Contributor

voku commented Feb 1, 2014

... also the "Magellan"-example in the doku use dl / dd? But it also running with ul / li ...

magellan-doku: http://foundation.zurb.com/docs/components/magellan.html
magellan-ul-li example: http://www.moelleken.org/Lebenslauf/tpl_lebenslauf13

@kelicia
Copy link
Contributor

kelicia commented Feb 3, 2014

yeah - really don't like it. see issue #797 too.

@kelicia kelicia mentioned this issue Feb 3, 2014
@jurriaan
Copy link
Author

jurriaan commented Feb 3, 2014

Tabs don't work with ul / li, didn't know about issue #797 and #1603, maybe the first one can be reopened and this one closed?

@AliceFox
Copy link

AliceFox commented Feb 7, 2014

I'm downgrading because I really question some of these choices. Features removed (deep linking), unnecessary tags required (data-reveal), and I understand wanting to simplify sections even if I liked them but this is just bizarre. I did appreciate that there was a little less CSS this time around, I think Foundation would benefit from a less styled version, but it's back to version 4 for me.

@smileyj68
Copy link

We found in practice the sections element was great for quick prototyping and an unholy disaster for actual production work (the enforced styling was way too rigid). Our belief at this juncture is that the tabs / accordion elements combined with either visibility classes or Interchange provide a more robust albeit wordier solution.

I am interested to hear about other ideas for this – it was not an easy decision. As far as tabs are concerned they should be built from UL not DL elements, and we'll be adjusting that in the near future (for a number of elements, actually, by removing the specific tag dependency).

@smileyj68 smileyj68 self-assigned this Feb 8, 2014
@smileyj68 smileyj68 added this to the 5.2 milestone Feb 8, 2014
@ebonner ebonner added the tabs label Feb 11, 2014
@rafibomb rafibomb assigned rafibomb and unassigned smileyj68 and rafibomb Feb 25, 2014
@smileyj68 smileyj68 self-assigned this Feb 25, 2014
@guymeyer
Copy link

"(for a number of elements, actually, by removing the specific tag dependency)."

/me presses imaginary like button.

@smileyj68
Copy link

Okay, this will be removed and switched to an agnostic, class-based implementation for 5.3.

@smileyj68 smileyj68 modified the milestones: 5.3, 5.2 Mar 4, 2014
@kelicia
Copy link
Contributor

kelicia commented Mar 5, 2014

Hoorah!

@andrewcroce
Copy link

I would add my support for removing any dependency on specific tags. Any progress on this?

@smileyj68
Copy link

Working on it. So many things to do girl. It's on the list.

@ctalkington
Copy link
Contributor

@smileyj68 would be good to make mixins for like tab-container, tab-element etc. so that one can support other structures in cases where you are styling a site that already has the tab output with builtin js.

@smileyj68
Copy link

Okay, for now: you can now use the tab component with DLs, ULs, or really any elements at all as long as you put the .tabs class on the container and .tab-title on each immediate child. Boom, baby. 0608559

@pixeline
Copy link

very smacss, thanks!

@kelicia
Copy link
Contributor

kelicia commented May 21, 2014

Awesome!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests