Scott digs into the historical past of the <menu> component. He traced it way back to HTML 2 (!) in a 1994 changelog. The vibe then, it appears, was to mark up a listing. I might suspect the intention is very like <nav> is at the moment, however I actually don’t know.

Brief story: HTML 4 deprecated it, HTML 5 revived it—this time as a “group of instructions”—after which HTML 5.2 deprecated it once more. Form of a bummer because it has some clear use circumstances.

So, it’s been fairly the curler coaster for ol’ <menu>! There by no means appears to be any straightforward wins for HTML evolution. As of now, it’s in “don’t hassle” territory:

I actually wrote this submit as a form of counter level to the usually uttered phrase “use semantic HTML and also you get accessibility free of charge!” That assertion, on its floor, is essentially true. And also you ought to use semantic HTML wherever its use is suitable. <menu>, sadly, doesn’t actually give us all that a lot, despite the fact that it has clearly outlined semantics. Its supposed semantics and what we really want in actuality are higher served by both simply utilizing the extra strong <ul> component, or creating your personal position=toolbarmenubar, and so on.. Utilizing this semantic component, for semantics sake, is simply that.

Direct Hyperlink →

#Semantic #menu #context #CSSTricks

Leave a Reply

Your email address will not be published. Required fields are marked *