Re: [csswg-drafts] [css-flexbox][css-grid] Providing authors with a method of opting into following the visual order, rather than logical order (#7387)

One thing I did not see mentioned is, what should happen to KB or AT focus when the layout order and/or focus order changes out of underneath the user? KB focus is easily detectable, but AT focus is usually not, so there is no consistent way to know whether the user is in an appropriate context where it's acceptable for the author to change the respective orders. Perhaps the recommendation should be to only change the order on user action, and have an optional parameter (in a JS API) that hints where the new focus and AT focus should go. 

I'm looking forward to attending the CSS call to discuss this. I think the proposal is a good starting point, but a CSS algorithm may be insufficient to determine where KB or AT focus should "land." That said, requiring authors to call focus() after the change also hasn't proven to work well. I could be convinced that algorithms may handle the general cases if explicit ordering and focus options remain.

Some additional comments that came from Apple internal discussion:
- would need to determine visual/layout order for all cases of grid and flex, not just simple cases
- Is this something that the spec authors intend to define, or is it left to the implementation to determine what constitutes visual/layout order?
- As with above, what happens when the layout algorithm and DOM still result in an unintended order? Can an author override?

-- 
GitHub Notification of comment by cookiecrook
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7387#issuecomment-1260154322 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 27 September 2022 22:52:23 UTC