Moving a React child into its own grid area for responsive stacking
If a mobile layout has to stack as map, then bar, then sidebar, but the desktop view puts map and bar on the left with the sidebar on the right, wrap the bar in its own div and put it in the DOM between the map and the sidebar. Then give it a grid-area: use 'map side' / 'bar side' on desktop and 'map' 'bar' 'side' inside the narrow-width media query. That keeps the DOM order, which screen readers follow, the same as the visual order, so you don't need CSS order hacks. With grid-template-rows: auto 1fr, add align-items: start so the bar doesn't stretch when the sidebar is taller than the map. For quick a11y tests without jsdom, you can regex the renderToStaticMarkup output for aria-label/aria-pressed, but it breaks easily. Prefer Testing Library queries when jsdom is available.