You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-nav-1/Overview.bs
+19-22Lines changed: 19 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1066,9 +1066,14 @@ including all graphical transformations, such as <a>relative positioning</a> or
1066
1066
1067
1067
The <dfn>boundary box</dfn> of an object is defined as follows:
1068
1068
* if the object is a point, the boundary box is that point
1069
-
* if the object is a [=box=] or [=box fragment=], the boundary box is the <a>border box</a> of that box or fragment.
1069
+
* if the object is a [=box=] or [=box fragment=], the boundary box is the <a>border box</a> of that box or fragment
1070
1070
* if the object is a <a>focusable area</a> which is not an element, the boundary box is the axis-aligned the bounding box of that <a>focusable area</a>
1071
1071
1072
+
The <dfn>inside area </dfn> of an object is defined as follows:
1073
+
* if the object is a <a>scroll container</a>, its <a>optimal viewing region</a>
1074
+
* if the object is a <a>document</a>, the viewport of its <a>browsing context</a>
1075
+
* otherwise, the <a>optimal viewing region</a> of its nearest ancestor <a>scroll container</a>
1076
+
1072
1077
Issue(w3c/csswg-drafts#2324): CSS should have a term for “border box taking into account corner shaping properties like border-radius”.
1073
1078
1074
1079
<div algorithm="to find focusable areas">
@@ -1087,13 +1092,9 @@ run the following steps:
1087
1092
return <var>focusables</var>.
1088
1093
1089
1094
Note: <var>focusables</var> may be empty
1090
-
4. Let <var>insideArea</var> be
1091
-
* the <a>optimal viewing region</a> of <var>C</var> if <var>C</var> is a <a>scroll container</a>,
1092
-
* the viewport of <var>C</var>'s <a for="/">browsing context</a> if <var>C</var> is a <a>Document</a>,
1093
-
* the <a>optimal viewing region</a> of <var>C</var>'s nearest ancestor <a>scroll container</a> otherwise.
1094
-
5. Let <var>visibles</var> be the subset of items in <var>focusables</var>
1095
+
4. Let <var>visibles</var> be the subset of items in <var>focusables</var>
1095
1096
whose <a>boundary box</a>
1096
-
is at least partly within <var>insideArea</var>.
1097
+
is at least partly within the <a>inside area</a> of <var>C</var>.
1097
1098
1098
1099
<div class="advisement non-normative">
1099
1100
Except for elements that are in the currently non visible part of a scroller,
@@ -1109,7 +1110,7 @@ run the following steps:
1109
1110
or the <a href="https://github.com/WICG/inert"><code>inert</code></a> attribute.
1110
1111
</div>
1111
1112
1112
-
6. Return <var>visibles</var>.
1113
+
5. Return <var>visibles</var>.
1113
1114
1114
1115
Note: <var>visibles</var> may be empty
1115
1116
@@ -1125,25 +1126,21 @@ run the following steps:
1125
1126
1126
1127
1. If <var>candidates</var> is <a spec=infra for=set>empty</a>, return <code>null</code>
1127
1128
2. If <var>candidates</var> contains a single item, return that item
1128
-
3. Let <var>insideArea</var> be
1129
-
* the <a>optimal viewing region</a> of <var>searchOrigin</var> if <var>searchOrigin</var> is a <a>scroll container</a>,
1130
-
* the viewport if <var>searchOrigin</var> is a <a>Document</a>,
1131
-
* the <a>optimal viewing region</a> of <var>searchOrigin</var>’s nearest ancestor <a>scroll container</a> otherwise.
1132
-
4. Let <var>insiders</var> be the subset of <var>candidates</var>
1129
+
3. Let <var>insiders</var> be the subset of <var>candidates</var>
1133
1130
whose <a>boundary box</a>'s
1134
-
* top edge is below the top edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/down}}
1135
-
* bottom edge is above the bottom edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/up}}
1136
-
* right edge is left of the right edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/left}}
1137
-
* left edge is right of the left edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/right}}
1131
+
* top edge is below the top edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/down}}
1132
+
* bottom edge is above the bottom edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/up}}
1133
+
* right edge is left of the right edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/left}}
1134
+
* left edge is right of the left edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/right}}
1138
1135
1139
1136
Note: this sub-setting is necessary to avoid going in the opposite direction than the one requested.
1140
-
5.
1137
+
4.
1141
1138
* If <var>insiders</var> is non empty,
1142
1139
1. Let <var>closest subset</var> be the subset of <var>insiders</var> whose <a>boundary box</a>'s
1143
-
* top edge is closest to the top edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/down}}
1144
-
* bottom edge is closest to the bottom edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/up}}
1145
-
* right edge is closest to the right edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/left}}
1146
-
* left edge is closest to the left edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/right}}
1140
+
* top edge is closest to the top edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/down}}
1141
+
* bottom edge is closest to the bottom edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/up}}
1142
+
* right edge is closest to the right edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/left}}
1143
+
* left edge is closest to the left edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/right}}
1147
1144
2. If <var>closest subset</var> contains a single item,
1148
1145
return that item,
1149
1146
else return the first item of <var>closest subset</var> in document order,
0 commit comments