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-ui-4/Overview.bs
+113-1
Original file line number
Diff line number
Diff line change
@@ -863,7 +863,118 @@ Omitted values are set to their initial values.
863
863
864
864
<h4 id="nav-dir">Directional Focus Navigation: the 'nav-up', 'nav-right', 'nav-down', 'nav-left' properties</h4>
865
865
866
-
Issue: Add final level 3 content
866
+
<pre class="propdef">
867
+
Name: nav-up , nav-right , nav-down , nav-left
868
+
Value: auto | <<id>> [ current | root | <<target-name>> ]?
869
+
Initial: auto
870
+
Applies to: all enabled elements
871
+
Inherited: no
872
+
Percentages: N/A
873
+
Media: interactive
874
+
Computed value: as specified
875
+
</pre>
876
+
877
+
<dl>
878
+
<dt>auto</dt>
879
+
<dd>The user agent automatically determines which element to navigate the focus to in response to directional navigational input.</dd>
880
+
<dt><dfn noexport><<id>></dfn></dt>
881
+
<dd><p>The <<id>> value is an ID selector [[SELECT]].
882
+
In response to directional navigation input corresponding to the property,
883
+
the focus is navigated to the first element in tree order matching the selector.
884
+
885
+
If this refers to the currently focused element,
886
+
the directional navigation input respective to the nav- property is ignored —
887
+
there is no need to refocus the same element.
888
+
889
+
If no element matches the selector,
890
+
the user agent automatically determines which element to navigate the focus to.
891
+
892
+
If the focus is navigated to an element
893
+
that was not otherwise focusable,
894
+
it becomes focusable
895
+
only as the result of this directional navigation,
896
+
and the <css>:focus</css> pseudo-class matches the element
897
+
while it is focused as such.
898
+
899
+
Note: there were other options under consideration for such "not otherwise focusable" elements, including focus to the next otherwise focusable element in the document tree (including descendants of such a not otherwise focusable element). Input on such other options is welcome and explicitly solicited, especially from implementation experiences and author experience using the directional navigation properties in their content.
900
+
901
+
</dd>
902
+
<dt><dfn noexport><<target-name>></dfn></dt>
903
+
<dd>
904
+
The <target-name> parameter indicates the target frame for the focus navigation.
905
+
It is a <<string>> and it MUST NOT start with the underscore "_" character.
906
+
Error handling: if it does start with an underscore, "_parent" navigates to the parent frame,
907
+
"_root" is treated as ''root'',
908
+
and other values navigate to a frame by that name if it exists.
909
+
If the specified target frame does not exist,
910
+
the parameter will be treated as the keyword ''current'',
911
+
which means to simply use the frame that the element is in.
912
+
The keyword ''root'' indicates that the user agent should target the full window.
913
+
</dd>
914
+
</dl>
915
+
916
+
User agents for devices with directional navigation keys
917
+
respond by navigating the focus according to four respective nav-* directional navigation properties
918
+
(nav-up, nav-right, nav-down, nav-left).
919
+
This specification does not define which keys of a device are directional navigational keys.
920
+
921
+
Note: Typical personal computers have keyboards with four arrow keys.
922
+
One possible implementation would be to use those four arrow keys for directional navigation.
923
+
For accessibility and user convenience,
924
+
user agents should allow configuration of which keys on a keyboard are used for directional navigation.
Here is an example of buttons positioned in a diamond shape
930
+
whose directional focus navigation is set in such a way
931
+
to navigate the focus clockwise (or counter-clockwise) around the diamond shape
932
+
when the user chooses to navigate directionally.
933
+
<pre><code class="lang-css">
934
+
button { position:absolute }
935
+
936
+
button#b1 {
937
+
top:0; left:50%;
938
+
nav-right:#b2; nav-left:#b4;
939
+
nav-down:#b2; nav-up:#b4;
940
+
}
941
+
942
+
button#b2 {
943
+
top:50%; left:100%;
944
+
nav-right:#b3; nav-left:#b1;
945
+
nav-down:#b3; nav-up:#b1;
946
+
}
947
+
948
+
button#b3 {
949
+
top:100%; left:50%;
950
+
nav-right:#b4; nav-left:#b2;
951
+
nav-down:#b4; nav-up:#b2;
952
+
}
953
+
954
+
button#b4 {
955
+
top:50%; left:0;
956
+
nav-right:#b1; nav-left:#b3;
957
+
nav-down:#b1; nav-up:#b3;
958
+
}
959
+
</code></pre>
960
+
961
+
Whatever markup sequence the buttons may have
962
+
(which is not specified in this example)
963
+
is irrelevant in this case because they are positioned, and yet,
964
+
it is still important to ensure focus navigation behaviors which relate reasonably to the specified layout.
965
+
</div>
966
+
967
+
<div class="example">
968
+
<h5 id=example-moving-focus-to-inside-a-frame>Example: moving focus to inside a frame</h5>
969
+
970
+
Moving the focus to an element in a specific frame requires both the element's id and the frame's name.
971
+
972
+
This example shows how to make navigating left from the button with id "foo" move the focus to the element with id "bar" within the frame named "sidebar".
973
+
974
+
<pre><code class="lang-css">
975
+
button#foo { nav-left: #bar "sidebar"; }
976
+
</code></pre>
977
+
</div>
867
978
868
979
<h4 id="input-method-editor">Obsolete: the ime-mode property</h4>
869
980
@@ -1379,6 +1490,7 @@ This appendix describes functional changes from the
1379
1490
replaced elements representing images or videos,
1380
1491
and to iframes.
1381
1492
<li>The string values and dual values of the text-overflow property were moved to this specification from level 3.
1493
+
<li>Move directional focus navigation properties from level 3 to level 4
1382
1494
</ul>
1383
1495
1384
1496
<h2 class="no-num" id="security-privacy-considerations">Appendix C. Considerations for Security and Privacy</h2>
Copy file name to clipboardExpand all lines: css-ui/Overview.bs
+1-121
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,6 @@ Link Defaults: css-writing-modes-3 (dfn) end
32
32
Ignored Terms: outline-top
33
33
Ignored Terms: outline-left
34
34
Ignored Terms: ime-mode
35
-
At Risk: Directional focus navigation: the 'nav-up', 'nav-right', 'nav-down', 'nav-left' properties
36
35
Can I Use URL: https://drafts.csswg.org/css-ui-3/
37
36
Can I Use URL: http://drafts.csswg.org/css-ui-3/
38
37
Can I Use URL: https://drafts.csswg.org/css-ui/
@@ -120,8 +119,6 @@ The purpose of this specification is to achieve the following objectives:
120
119
<li>Extend the user interface features in CSS2.1.
121
120
<li>Provide additional CSS mechanisms to augment or replace other
122
121
dynamic presentation related features in HTML.
123
-
<li>Introduce directional navigation properties to assist in the construction of
124
-
user interfaces which make use of a directional navigation model.
125
122
</ul>
126
123
127
124
@@ -1254,124 +1251,6 @@ caret-color:#00aacc
1254
1251
1255
1252
<h3 id="keyboard">Keyboard control</h3>
1256
1253
1257
-
<h4 id="nav-dir">Directional Focus Navigation: the 'nav-up', 'nav-right', 'nav-down', 'nav-left' properties</h4>
1258
-
1259
-
This section is at risk.
1260
-
1261
-
<pre class="propdef">
1262
-
Name: nav-up , nav-right , nav-down , nav-left
1263
-
Value: auto | <<id>> [ current | root | <<target-name>> ]?
1264
-
Initial: auto
1265
-
Applies to: all enabled elements
1266
-
Inherited: no
1267
-
Percentages: N/A
1268
-
Media: interactive
1269
-
Computed value: as specified
1270
-
</pre>
1271
-
1272
-
<dl>
1273
-
<dt>auto</dt>
1274
-
<dd>The user agent automatically determines which element to navigate the focus to in response to directional navigational input.</dd>
1275
-
<dt><dfn noexport><<id>></dfn></dt>
1276
-
<dd><p>The <<id>> value is an ID selector [[SELECT]].
1277
-
In response to directional navigation input corresponding to the property,
1278
-
the focus is navigated to the first element in tree order matching the selector.
1279
-
1280
-
If this refers to the currently focused element,
1281
-
the directional navigation input respective to the nav- property is ignored —
1282
-
there is no need to refocus the same element.
1283
-
1284
-
If no element matches the selector,
1285
-
the user agent automatically determines which element to navigate the focus to.
1286
-
1287
-
If the focus is navigated to an element
1288
-
that was not otherwise focusable,
1289
-
it becomes focusable
1290
-
only as the result of this directional navigation,
1291
-
and the <css>:focus</css> pseudo-class matches the element
1292
-
while it is focused as such.
1293
-
1294
-
Note: there were other options under consideration for such "not otherwise focusable" elements, including focus to the next otherwise focusable element in the document tree (including descendants of such a not otherwise focusable element). Input on such other options is welcome and explicitly solicited, especially from implementation experiences and author experience using the directional navigation properties in their content.
1295
-
1296
-
</dd>
1297
-
<dt><dfn noexport><<target-name>></dfn></dt>
1298
-
<dd>
1299
-
The <target-name> parameter indicates the target frame for the focus navigation.
1300
-
It is a <<string>> and it MUST NOT start with the underscore "_" character.
1301
-
Error handling: if it does start with an underscore, "_parent" navigates to the parent frame,
1302
-
"_root" is treated as ''root'',
1303
-
and other values navigate to a frame by that name if it exists.
1304
-
If the specified target frame does not exist,
1305
-
the parameter will be treated as the keyword ''current'',
1306
-
which means to simply use the frame that the element is in.
1307
-
The keyword ''root'' indicates that the user agent should target the full window.
1308
-
</dd>
1309
-
</dl>
1310
-
1311
-
User agents for devices with directional navigation keys
1312
-
respond by navigating the focus according to four respective nav-* directional navigation properties
1313
-
(nav-up, nav-right, nav-down, nav-left).
1314
-
This specification does not define which keys of a device are directional navigational keys.
1315
-
1316
-
Note: Typical personal computers have keyboards with four arrow keys.
1317
-
One possible implementation would be to use those four arrow keys for directional navigation.
1318
-
For accessibility and user convenience,
1319
-
user agents should allow configuration of which keys on a keyboard are used for directional navigation.
Here is an example of buttons positioned in a diamond shape
1325
-
whose directional focus navigation is set in such a way
1326
-
to navigate the focus clockwise (or counter-clockwise) around the diamond shape
1327
-
when the user chooses to navigate directionally.
1328
-
<pre><code class="lang-css">
1329
-
button { position:absolute }
1330
-
1331
-
button#b1 {
1332
-
top:0; left:50%;
1333
-
nav-right:#b2; nav-left:#b4;
1334
-
nav-down:#b2; nav-up:#b4;
1335
-
}
1336
-
1337
-
button#b2 {
1338
-
top:50%; left:100%;
1339
-
nav-right:#b3; nav-left:#b1;
1340
-
nav-down:#b3; nav-up:#b1;
1341
-
}
1342
-
1343
-
button#b3 {
1344
-
top:100%; left:50%;
1345
-
nav-right:#b4; nav-left:#b2;
1346
-
nav-down:#b4; nav-up:#b2;
1347
-
}
1348
-
1349
-
button#b4 {
1350
-
top:50%; left:0;
1351
-
nav-right:#b1; nav-left:#b3;
1352
-
nav-down:#b1; nav-up:#b3;
1353
-
}
1354
-
</code></pre>
1355
-
1356
-
Whatever markup sequence the buttons may have
1357
-
(which is not specified in this example)
1358
-
is irrelevant in this case because they are positioned, and yet,
1359
-
it is still important to ensure focus navigation behaviors which relate reasonably to the specified layout.
1360
-
</div>
1361
-
1362
-
<div class="example">
1363
-
<h5 id=example-moving-focus-to-inside-a-frame>Example: moving focus to inside a frame</h5>
1364
-
1365
-
Moving the focus to an element in a specific frame requires both the element's id and the frame's name.
1366
-
1367
-
This example shows how to make navigating left from the button with id "foo" move the focus to the element with id "bar" within the frame named "sidebar".
1368
-
1369
-
<pre><code class="lang-css">
1370
-
button#foo { nav-left: #bar "sidebar"; }
1371
-
</code></pre>
1372
-
</div>
1373
-
1374
-
1375
1254
<h4 id="input-method-editor">Obsolete: the ime-mode property</h4>
1376
1255
1377
1256
"ime-mode" is a property somewhat implemented in some browsers, that is problematic and officially obsoleted by this specification.
@@ -1483,6 +1362,7 @@ This appendix describes changes from the
1483
1362
<ul>
1484
1363
<li>Updated references to latest versions
1485
1364
<li>Editorial Clarification about the resize property
1365
+
<li>Move directional focus navigation properties from level 3 to level 4
1486
1366
</ul>
1487
1367
1488
1368
<h2 class="no-num" id="security-privacy-considerations">Appendix C. Considerations for Security and Privacy</h2>
0 commit comments