ucla-oarc-mobile / mwf

UCLA Mobile Web Framework
http://mwf.ucla.edu
Other
86 stars 25 forks source link

<ol> and <ul> menus #146

Closed dearmond closed 12 years ago

dearmond commented 12 years ago

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 commented 12 years ago

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,

Trott commented 12 years ago

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 commented 12 years ago

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?

loganfranken commented 12 years ago

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 commented 12 years ago

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

dearmond commented 12 years ago

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 commented 12 years ago

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

dearmond commented 12 years ago

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 commented 12 years ago

@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.