Re: [csswg-drafts] [css-nav-1] Tweak the distance function to prioritize elements that are aligned (#3388)

---

Migrated from https://github.com/WICG/spatial-navigation/issues/122#issuecomment-437250623
Originally created by @jihyerish

---
@hugoholgersson
Yes, I agree with you. Measuring the distance depending on the centroid can achieve the more precise result.

I've been also considering the case that you described above.
To cover this case, the span element is considered as the two fragments.
So inside the element's border box, the closest fragment from the edge which is on the direction of the navigation will be selected to use for calculating the distance.

In your example, if the user presses the down arrow key, from the "XXXXXXX" fragment in the second line the distance value will be calculated.

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

Received on Tuesday, 4 December 2018 04:14:54 UTC