4 ms·
TIL <menu>, I wonder why more frameworks don't make use of it.
by nektro 5mo ago
TIL <menu>, I wonder why more frameworks don't make use of it.
- pphysch 5mo agobig brain no learn hyperspeak when many div do trick
- stirfish 5mo ago<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.
- extra88 5mo ago<dialog> is awesome, especially when combined with Invoker commands or `popover`. <menu> does nothing, it's just another name for <ul>.
- paceaux 5mo ago<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.
- extra88 5mo agoBecause 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/ https://www.w3.org/WAI/ARIA/apg/patterns/menubar/