News for hackers. Stuff that matters.
Re:HTML Lists by nektro on Saturday May 16, 2026 @03:19PM (#48162958)
TIL <menu>, I wonder why more frameworks don't make use of it.
Re:HTML Lists by pphysch on Saturday May 16, 2026 @03:33PM (#48163053)
big brain no learn hyperspeak when many div do trick
Re:HTML Lists by stirfish on Saturday May 16, 2026 @04:26PM (#48163497)
<menu>, <dialog>, lots of fun stuff in html now.

I like to ask people what they imagine <ruby> does, because I certainly didn't guess right.

Re:HTML Lists by extra88 on Saturday May 16, 2026 @07:16PM (#48164629)
<dialog> is awesome, especially when combined with Invoker commands or `popover`. <menu> does nothing, it's just another name for <ul>.
Re:HTML Lists by paceaux on Saturday May 16, 2026 @09:16PM (#48165258)
<ruby> is going to be featured in my next article: You don't know HTML…Semantics.

I'm debating whether that one will be one or two articles because I'm going to be covering everything from <ruby>, <bdi>, <bdo> all the way through <var>, <kbd>, <samp>, <cite>, and <q>.

After that one, I'll probably have something like, "You don't know HTML interactions" or something to cover <dialog>, <popover>, and the Invoker API.

So sit tight; it's all coming.

Re:HTML Lists by extra88 on Saturday May 16, 2026 @07:14PM (#48164621)
Because for the user experience, it is identical to <ul>. Use <menu> if it helps you to understand your code but in the browser's accessibility tree and in all other respects, it's just an unordered list.

Conveying that something is a list of actions requires adding ARIA attributes. The article mentions `role=menu` but that's not enough, each item also needs the `menuitem` role. The WAI Authoring Practices Guide explains the roles and interaction expectations; don't copy their coded examples and definitely don't use the roles for navigation menus.

https://www.w3.org/WAI/ARIA/apg/patterns/menubar/