whatwg / html

HTML Standard
https://html.spec.whatwg.org/multipage/
Other
8.1k stars 2.67k forks source link

Discussing how to focus navigate absolute position elements that are focusable in CSS reading-flow #10539

Open dizhang168 opened 2 months ago

dizhang168 commented 2 months ago

What is the issue with the HTML Standard?

As brought up by @emilio during the WHATNOT meeting, elements that have CSS position: absolute do not participate in the grid/flex layout. Its focus navigation order is hence unclear, similar to the display: contents case (https://github.com/whatwg/html/issues/10533).

Example: https://codepen.io/mfreed7/pen/poXeVbv

The proposal for reading-flow focus navigation should handle this case.

dizhang168 commented 3 days ago

For elements that are not included in the flex/grid layout such as position: absolute, we propose visiting them at the end of the reading flow, in DOM order.