Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

<ol> and <ul> menus #146

Closed
dearmond opened this issue Jun 21, 2012 · 9 comments
Closed

<ol> and <ul> menus #146

dearmond opened this issue Jun 21, 2012 · 9 comments
Assignees
Labels
Milestone

Comments

@dearmond
Copy link

Is there a reason why the menu items have to be ordered lists? It doesn't display the ordered numbers/letters or anything, so I don't see why it's necessary.

As a solution, I would like to see unordered lists, <ul>, work similarly to ordered lists, <ol>, for menus.

@ghost
Copy link

ghost commented Jun 21, 2012

I believe it is to provide short-cuts.

https://github.com/ucla/mwf/wiki/API%3A-CSS%3A-Menu

On 6/21/12 8:08 AM, "Shawn DeArmond"
<reply+i-5195626-af8b17e2acfe29c0300e97a497b0d761e195101f-898789@reply.gith
ub.com> wrote:

Is there a reason why the menu items have to be ordered lists? It doesn't
display the ordered numbers/letters or anything, so I don't see why it's
necessary.

As a solution, I would like to see either unordered lists,

    , work
    similarly to ordered lists,
      , for menus.


      Reply to this email directly or view it on GitHub:
      #146

@Trott
Copy link
Contributor

Trott commented Jun 21, 2012

More info at https://github.com/ucla/mwf/wiki/General%3A-Markup-Recommendations

Use <ol> rather than <ul> for menus. This allows access key references on simple devices.

Sounds like somebody believed that <ol> would allow keyboard shortcut access on feature phones and that <ul> wouldn't. I'm not sure if that's correct, but that seems to be what's going on.

@ebollens
Copy link
Contributor

Rich and Ike are correct that ol was selected back in MWF 1.0 because of recommendations in the Global Authoring Practices for the Mobile Web. However, under the modern environment where touch screen dominate our demongraphics, this may no longer make sense. I would not be opposed to extending the menu styles so that ul is acceptable as well as ol.

However, I am curious, what is the hesitation in using ol?

@ghost ghost assigned ebollens Jun 21, 2012
@loganfranken
Copy link
Contributor

I think the main argument would be that, in many cases, you don't care about the order of the menu items in a navigation menu so a ul would be more semantic.

Here are a few people stating the case better than me:
http://stackoverflow.com/questions/1775200/why-we-always-use-ul-to-make-navigation-why-not-ol

Of course, it's a thin line since you do care about the order in that elements towards the top of the list would be more prominent, but there's no logical ordering amongst the set of navigation items themselves. Not sure if the semantic gain outweighs the accessibility loss, though. If it's not difficult to also support ul, it probably couldn't hurt.

@ebollens
Copy link
Contributor

Not too difficult so we'll add this in a revision release of 1.3.

@dearmond
Copy link
Author

This is awesome, folks. Just getting back to it now, but I'm really impressed with the speed in which you all followed up on this issue.

I now understand why ol was originally selected, and if ul is added to 1.3, then that would be great.

Really, the only reason I asked is that I was working on the Drupal theme and found that Drupal outputs its menus as ul lists by default. It's not terribly difficult to rewrite the theme function so it outputs as ol, but I always try to keep everything as vanilla as possible.

Thanks again!

@ebollens
Copy link
Contributor

Completely understandable. The fact that Drupal uses ul by default is definitely another reason to provide ul support.

@dearmond
Copy link
Author

If you have access, you can follow my work on the MWF Drupal 7 theme here:
https://github.com/ucla/mwf-drupal/tree/7.x-1.x

It's pretty stable now, except that the menu will look wonky until ul support is provided.

@ebollens
Copy link
Contributor

@dearmond I have committed a couple fixes that make .menu ul equivalent to .menu ol. I've also updated the decorator to default to ul rather than ol, as I agree with @loganfranken and the responses he posted about why ul is actually more semantic than ol in many cases.

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

No branches or pull requests

4 participants