Reputation: 3242
I'm creating a website where I'm going to be using a horizontal accordion. I've found two jquery plugins that do what I want.
They both seem to do everything I need. The second one however uses ordered lists, while the first one uses a definition list. Which one is more semantically correct? Is this even a tractable problem, or will it depend on exactly how I'm using the accordion?
Each slide in the accordion will have a title, and the content of that slide will be expanding upon the title. While it isn't exactly defining the title, it will be very related to it.
Given this, which version do you think is better?
Thanks
Upvotes: 2
Views: 302
Reputation: 4316
It will ultimately depend on the content for which you employ one of these plugins. Semantically speaking, if you have somewhat unrelated content for the accordion, the use of the definition list will make use of semantically defining the term (the accordion element's clickable title) as its following content.
However if all of the content is related, technically using an unordered list semantically could detail more clearly that all of the content is collect as one list with no single piece being defined differently than any other.
Upvotes: 1
Reputation: 11464
I would say an ordered list would have more semantic meaning, as you are not defining terms to be used later on in your content.
Upvotes: 2