)]}'
{
  "commit": "ffc1278842a2a03281da56cbfdc379ef94b84886",
  "tree": "2ed864da026a944626b66a13873282a5abf4ab60",
  "parents": [
    "fc71f2419a1c605762ae772e106374c4c894a8f8"
  ],
  "author": {
    "name": "Mark Otto",
    "email": "markd.otto@gmail.com",
    "time": "Sat Aug 08 03:46:53 2026"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sat Aug 08 03:46:53 2026"
  },
  "message": "Fix Menu keyboard navigation inside nested submenus (#42804)\n\n* Fix Menu keyboard navigation inside nested submenus\n\nArrow keys collected only the direct `.menu-item` children of `.menu`, so\nthey skipped every submenu trigger, which sits at `.menu \u003e .submenu \u003e\n.menu-item`. A menu built entirely from submenus had no reachable items.\n\nKeys pressed inside an open submenu panel did nothing at all. The keydown\nhandler is delegated on both the toggle and `.menu`, and delegation stops\nat the innermost match, so the handler ran on the nested `.menu`. From\nthere the toggle is not a sibling, and the last-resort lookup only\nsearched the `.submenu` wrapper. The handler bailed out before any branch,\nwhich killed the arrows, Home, End and Escape. Escape left the user unable\nto dismiss the menu by keyboard. The same lookup also picked the first\ntoggle in the document when a menu used `container`, so an arrow key could\nopen an unrelated menu.\n\nResolve the owning menu from the open instances first, and treat submenu\ntriggers as items of their parent level. Moving focus along a level now\ncloses the submenus focus left behind, which matches hover and click.\n\nTwo specs claimed to cover the submenu ArrowLeft and Escape paths but\ncalled the methods directly instead of dispatching keys, and a third\nasserted nothing. That is why the regression stayed hidden. All three now\ndispatch real events, and new specs cover the arrows, Home, End, ArrowLeft\nand Escape inside open submenus, a third level, and the `container` case.\n\nCo-authored-by: Aljo Joby \u003c141745680+aljojoby9@users.noreply.github.com\u003e\n\n* Merge the duplicate submenu open branches in Menu\n\nEnter, Space and the RTL-aware enter arrow each opened a submenu through\ntheir own copy of the same sixteen lines. Only the key test differed, so\none guard covers all three.\n\n* Mark Menu submenu triggers as popups on init\n\nA submenu trigger only got `aria-haspopup` when its submenu first opened,\nand it never got a starting `aria-expanded`. Assistive technology\ntherefore gave no hint that a submenu existed until the user had already\nopened it.\n\nSet both attributes on every `.submenu \u003e .menu-item` that wraps a nested\n`.menu`, at any depth, when the instance is created. A closed menu is\n`display: none`, so the triggers enter the accessibility tree only after\nthe toggle builds the instance, which keeps the lazy data API correct. An\nauthor supplied `aria-expanded` is left alone, for a submenu that must\nstart open.\n\n* Raise the minified JS budgets by a quarter kilobyte\n\nThe keyboard and aria work adds about 190 bytes to each minified bundle,\nwhich left both budgets with roughly a hundred bytes of room. The next\nsmall addition to any component would have failed CI for no reason of its\nown. Raise both by one step so the ceiling moves on purpose rather than\nduring an unrelated review.\n\n---------\n\nCo-authored-by: Aljo Joby \u003c141745680+aljojoby9@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "82ebf2677d03f5c252a6dab2834532e94e4889b9",
      "old_mode": 33188,
      "old_path": ".bundlewatch.config.json",
      "new_id": "4befec87e0204f6699cefd708feb39deaab6b765",
      "new_mode": 33188,
      "new_path": ".bundlewatch.config.json"
    },
    {
      "type": "modify",
      "old_id": "ace969bd4a7ad23eb47e534c960e4f35f8caad0f",
      "old_mode": 33188,
      "old_path": "js/src/menu.ts",
      "new_id": "23e26f9e55b6e97ec053162141841b8ef5ae090c",
      "new_mode": 33188,
      "new_path": "js/src/menu.ts"
    },
    {
      "type": "modify",
      "old_id": "db5c0525a689d402efc8750fbcebcf280b12ff9f",
      "old_mode": 33188,
      "old_path": "js/tests/unit/menu.spec.js",
      "new_id": "76dd44dc67fa775767973e8673fe9841b9fb0e2e",
      "new_mode": 33188,
      "new_path": "js/tests/unit/menu.spec.js"
    },
    {
      "type": "modify",
      "old_id": "311c788177b6498fbc9c0b6b92e03d8162842d68",
      "old_mode": 33188,
      "old_path": "site/src/content/docs/components/menu.mdx",
      "new_id": "cbcfc901075222e62b367341456ac4846f9507fc",
      "new_mode": 33188,
      "new_path": "site/src/content/docs/components/menu.mdx"
    }
  ]
}
