w3c / w3c/csswg-drafts

[css-nav-1] Consider candidates on the navigation direction.

Open
#4,483 11 comments 0 reactions 1 assignee View on GitHub

@jihyerish is already working on this.

Since Nov 8, 2019.

css-spatial-nav-1
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

I want to resolve some unreachable cases caused by current spec about determining whether the candidate is on the navigation direction or not.

In the below example, Let's assume that user press right-button from A/C/E.

image

B and D is reachable from A /C.
According to current spec and chromium, F is not right side of E

*Spec :
https://drafts.csswg.org/css-nav-1/
-> "the item partially overlaps with searchOrigin and its two edges which are orthogonal to dir should be on the navigation direction of the respective ones of searchOrigin."

*Chromium : https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/page/spatial_navigation.cc?q=spatial_navigation.cc&sq=package:chromium&dr&l=117
static inline bool RightOf(const PhysicalRect& a, const PhysicalRect& b) {
return a.X() >= b.Right() || (a.X() >= b.X() && a.Right() > b.Right() &&
a.Y() < b.Bottom() && a.Bottom() > b.Y());
}

I hope to remove "a.Right() > b.Right()" part.
Is there a problem if User can go from E to F using right key?
I would like to know your opinions. (@jihyerish @frivoal @hugoholgersson @Bokand @anawhj )

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.