@atom63/ui-foundation 0.1.1-beta.2 → 0.1.1-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +403 -15
- package/dist/index.js +1520 -19
- package/dist/index.js.map +1 -1
- package/package.json +8 -6
package/dist/index.js
CHANGED
|
@@ -870,7 +870,7 @@ var crossRendererContracts = [
|
|
|
870
870
|
"foundationAxis": "states",
|
|
871
871
|
"catalogItem": "radioGroup",
|
|
872
872
|
"reactRenderer": "RadioGroup / Radio",
|
|
873
|
-
"swiftUIRenderer": "Picker(.inline) / AtomSelectionRow group",
|
|
873
|
+
"swiftUIRenderer": "Picker(.inline) in a Form / AtomSelectionRow group",
|
|
874
874
|
"intent": "Choose exactly one value from a visible set of mutually exclusive options.",
|
|
875
875
|
"parity": "platform-adaptive",
|
|
876
876
|
"requiredStates": [
|
|
@@ -893,7 +893,7 @@ var crossRendererContracts = [
|
|
|
893
893
|
"Uses radiogroup and radio semantics with circular indicators and keyboard movement."
|
|
894
894
|
],
|
|
895
895
|
"swiftUI": [
|
|
896
|
-
"Uses an inline Picker or
|
|
896
|
+
"Uses an inline Picker inside a Form or List, where each option is a row with the native selected trait (outside one, iOS draws a wheel), or grouped AtomSelectionRow controls."
|
|
897
897
|
]
|
|
898
898
|
}
|
|
899
899
|
},
|
|
@@ -1073,7 +1073,7 @@ var crossRendererContracts = [
|
|
|
1073
1073
|
"foundationAxis": "states",
|
|
1074
1074
|
"catalogItem": "tabs",
|
|
1075
1075
|
"reactRenderer": "Tabs",
|
|
1076
|
-
"swiftUIRenderer": "
|
|
1076
|
+
"swiftUIRenderer": "Picker(.segmented) with the selected content",
|
|
1077
1077
|
"intent": "Switch between peer destinations or content views while keeping one selection active.",
|
|
1078
1078
|
"parity": "platform-adaptive",
|
|
1079
1079
|
"requiredStates": [
|
|
@@ -1095,7 +1095,7 @@ var crossRendererContracts = [
|
|
|
1095
1095
|
"Uses tablist, tab, and tabpanel semantics with keyboard navigation and a visual indicator."
|
|
1096
1096
|
],
|
|
1097
1097
|
"swiftUI": [
|
|
1098
|
-
"
|
|
1098
|
+
"In-page sections use a segmented Picker above the content it selects, so each tab is a named, selectable button. TabView stays the renderer for app-level sections such as a tab bar or sidebar."
|
|
1099
1099
|
]
|
|
1100
1100
|
}
|
|
1101
1101
|
},
|
|
@@ -1355,6 +1355,1448 @@ function getCrossRendererContract(id) {
|
|
|
1355
1355
|
return contract;
|
|
1356
1356
|
}
|
|
1357
1357
|
|
|
1358
|
+
// src/a11y/accordion.ts
|
|
1359
|
+
function expanded(at, value) {
|
|
1360
|
+
return { target: { part: "header", at }, attribute: "aria-expanded", equals: value };
|
|
1361
|
+
}
|
|
1362
|
+
var accordionPattern = {
|
|
1363
|
+
id: "accordion",
|
|
1364
|
+
name: "Accordion",
|
|
1365
|
+
source: "https://www.w3.org/WAI/ARIA/apg/patterns/accordion/",
|
|
1366
|
+
options: { collapse: ["collapsible", "keep-one"], expand: ["single", "multiple"] },
|
|
1367
|
+
parts: {
|
|
1368
|
+
heading: {
|
|
1369
|
+
description: "The heading, with an aria-level, that wraps each header button.",
|
|
1370
|
+
multiple: true,
|
|
1371
|
+
name: "required",
|
|
1372
|
+
role: "heading"
|
|
1373
|
+
},
|
|
1374
|
+
header: {
|
|
1375
|
+
description: "The header buttons, each titled by the section name.",
|
|
1376
|
+
multiple: true,
|
|
1377
|
+
name: "required",
|
|
1378
|
+
role: "button"
|
|
1379
|
+
},
|
|
1380
|
+
panel: {
|
|
1381
|
+
description: "The expanded panel, a region labelled by its header button.",
|
|
1382
|
+
name: "required",
|
|
1383
|
+
role: "region"
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
tree: [
|
|
1387
|
+
{ part: "heading", children: [{ part: "header", states: ["expanded"] }] },
|
|
1388
|
+
{ part: "panel" }
|
|
1389
|
+
],
|
|
1390
|
+
structure: [
|
|
1391
|
+
{
|
|
1392
|
+
id: "header-expanded-state",
|
|
1393
|
+
requirement: "required",
|
|
1394
|
+
rule: "Every header button has aria-expanded: true when its panel is visible, false when it is hidden.",
|
|
1395
|
+
target: { part: "header" },
|
|
1396
|
+
attribute: "aria-expanded",
|
|
1397
|
+
equals: ["true", "false"]
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
id: "header-controls-panel",
|
|
1401
|
+
requirement: "required",
|
|
1402
|
+
rule: "Every header button has aria-controls referring to the element that holds its panel.",
|
|
1403
|
+
target: { part: "header" },
|
|
1404
|
+
attribute: "aria-controls"
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
id: "expanded-header-controls-panel",
|
|
1408
|
+
requirement: "required",
|
|
1409
|
+
rule: "The header button of the expanded panel has aria-controls referring to that panel.",
|
|
1410
|
+
target: { part: "header", at: "first" },
|
|
1411
|
+
attribute: "aria-controls",
|
|
1412
|
+
references: "panel"
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
id: "panel-labelled-by-header",
|
|
1416
|
+
requirement: "optional",
|
|
1417
|
+
rule: "A panel with the region role has aria-labelledby referring to its header button.",
|
|
1418
|
+
target: { part: "panel" },
|
|
1419
|
+
attribute: "aria-labelledby",
|
|
1420
|
+
references: "header"
|
|
1421
|
+
}
|
|
1422
|
+
],
|
|
1423
|
+
keyboard: [
|
|
1424
|
+
{
|
|
1425
|
+
id: "enter-expands",
|
|
1426
|
+
key: "Enter",
|
|
1427
|
+
keys: "{Enter}",
|
|
1428
|
+
requirement: "required",
|
|
1429
|
+
given: { focus: { part: "header", at: 1 }, attributes: [expanded(1, "false")] },
|
|
1430
|
+
result: "On the header of a collapsed panel, expands the panel.",
|
|
1431
|
+
then: { focus: { part: "header", at: 1 }, attributes: [expanded(1, "true")] }
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
id: "space-expands",
|
|
1435
|
+
key: "Space",
|
|
1436
|
+
keys: "{ }",
|
|
1437
|
+
requirement: "required",
|
|
1438
|
+
given: { focus: { part: "header", at: 1 }, attributes: [expanded(1, "false")] },
|
|
1439
|
+
result: "On the header of a collapsed panel, expands the panel.",
|
|
1440
|
+
then: { focus: { part: "header", at: 1 }, attributes: [expanded(1, "true")] }
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
id: "enter-collapses-other",
|
|
1444
|
+
key: "Enter",
|
|
1445
|
+
keys: "{Enter}",
|
|
1446
|
+
requirement: "required",
|
|
1447
|
+
when: { expand: "single" },
|
|
1448
|
+
given: { focus: { part: "header", at: 1 }, attributes: [expanded("first", "true")] },
|
|
1449
|
+
result: "When only one panel can be expanded, expanding a panel collapses the one that was open.",
|
|
1450
|
+
then: { attributes: [expanded(1, "true"), expanded("first", "false")] }
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
id: "enter-keeps-other",
|
|
1454
|
+
key: "Enter",
|
|
1455
|
+
keys: "{Enter}",
|
|
1456
|
+
requirement: "required",
|
|
1457
|
+
when: { expand: "multiple" },
|
|
1458
|
+
given: { focus: { part: "header", at: 1 }, attributes: [expanded("first", "true")] },
|
|
1459
|
+
result: "When several panels can be expanded, expanding a panel leaves the open one expanded.",
|
|
1460
|
+
then: { attributes: [expanded(1, "true"), expanded("first", "true")] }
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
id: "enter-collapses",
|
|
1464
|
+
key: "Enter",
|
|
1465
|
+
keys: "{Enter}",
|
|
1466
|
+
requirement: "required",
|
|
1467
|
+
when: { collapse: "collapsible" },
|
|
1468
|
+
given: { focus: { part: "header", at: "first" }, attributes: [expanded("first", "true")] },
|
|
1469
|
+
result: "On the header of an expanded panel, collapses the panel.",
|
|
1470
|
+
then: { focus: { part: "header", at: "first" }, attributes: [expanded("first", "false")] }
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
id: "space-collapses",
|
|
1474
|
+
key: "Space",
|
|
1475
|
+
keys: "{ }",
|
|
1476
|
+
requirement: "required",
|
|
1477
|
+
when: { collapse: "collapsible" },
|
|
1478
|
+
given: { focus: { part: "header", at: "first" }, attributes: [expanded("first", "true")] },
|
|
1479
|
+
result: "On the header of an expanded panel, collapses the panel.",
|
|
1480
|
+
then: { focus: { part: "header", at: "first" }, attributes: [expanded("first", "false")] }
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
id: "enter-keeps-open",
|
|
1484
|
+
key: "Enter",
|
|
1485
|
+
keys: "{Enter}",
|
|
1486
|
+
requirement: "required",
|
|
1487
|
+
when: { collapse: "keep-one" },
|
|
1488
|
+
given: { focus: { part: "header", at: "first" }, attributes: [expanded("first", "true")] },
|
|
1489
|
+
result: "On the header of the one expanded panel, the panel stays expanded.",
|
|
1490
|
+
then: {
|
|
1491
|
+
focus: { part: "header", at: "first" },
|
|
1492
|
+
attributes: [
|
|
1493
|
+
expanded("first", "true"),
|
|
1494
|
+
{ target: { part: "header", at: "first" }, attribute: "aria-disabled", equals: "true" }
|
|
1495
|
+
]
|
|
1496
|
+
}
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
id: "tab-next-header",
|
|
1500
|
+
key: "Tab",
|
|
1501
|
+
keys: "{Tab}",
|
|
1502
|
+
requirement: "required",
|
|
1503
|
+
given: { focus: { part: "header", at: 1 }, attributes: [expanded(1, "false")] },
|
|
1504
|
+
result: "Moves focus to the next focusable element: past a collapsed panel, the next header.",
|
|
1505
|
+
then: { focus: { part: "header", at: 2 } }
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
id: "shift-tab-previous-header",
|
|
1509
|
+
key: "Shift + Tab",
|
|
1510
|
+
keys: "{Shift>}{Tab}{/Shift}",
|
|
1511
|
+
requirement: "required",
|
|
1512
|
+
given: { focus: { part: "header", at: 2 }, attributes: [expanded(1, "false")] },
|
|
1513
|
+
result: "Moves focus to the previous focusable element: past a collapsed panel, the previous header.",
|
|
1514
|
+
then: { focus: { part: "header", at: 1 } }
|
|
1515
|
+
}
|
|
1516
|
+
],
|
|
1517
|
+
ios: {
|
|
1518
|
+
parts: {
|
|
1519
|
+
header: {
|
|
1520
|
+
description: "A disclosure group header: a button named by its label. iOS does not report expanded state to XCUITest, so the checks follow the content it reveals.",
|
|
1521
|
+
name: "required",
|
|
1522
|
+
type: "button"
|
|
1523
|
+
},
|
|
1524
|
+
panel: {
|
|
1525
|
+
description: "Text of a disclosure group's content.",
|
|
1526
|
+
name: "required",
|
|
1527
|
+
type: "staticText"
|
|
1528
|
+
}
|
|
1529
|
+
},
|
|
1530
|
+
structure: [
|
|
1531
|
+
{ target: { part: "header", label: "Implementation details" }, enabled: true },
|
|
1532
|
+
{ target: { part: "header", label: "Unavailable details" }, enabled: false },
|
|
1533
|
+
{
|
|
1534
|
+
target: { part: "panel", label: "Native SwiftUI renderer with shared product intent." },
|
|
1535
|
+
exists: false
|
|
1536
|
+
}
|
|
1537
|
+
],
|
|
1538
|
+
interactions: [
|
|
1539
|
+
{
|
|
1540
|
+
id: "activation-expands",
|
|
1541
|
+
action: "tap",
|
|
1542
|
+
on: { part: "header", label: "Implementation details" },
|
|
1543
|
+
result: "Expands the section and shows its content.",
|
|
1544
|
+
then: [
|
|
1545
|
+
{
|
|
1546
|
+
target: { part: "panel", label: "Native SwiftUI renderer with shared product intent." },
|
|
1547
|
+
exists: true
|
|
1548
|
+
}
|
|
1549
|
+
]
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
id: "activation-collapses",
|
|
1553
|
+
action: "tap",
|
|
1554
|
+
on: { part: "header", label: "Implementation details" },
|
|
1555
|
+
result: "Collapses the section and hides its content.",
|
|
1556
|
+
then: [
|
|
1557
|
+
{
|
|
1558
|
+
target: { part: "panel", label: "Native SwiftUI renderer with shared product intent." },
|
|
1559
|
+
exists: false
|
|
1560
|
+
}
|
|
1561
|
+
]
|
|
1562
|
+
}
|
|
1563
|
+
]
|
|
1564
|
+
}
|
|
1565
|
+
};
|
|
1566
|
+
|
|
1567
|
+
// src/a11y/dialog.ts
|
|
1568
|
+
function modalDialogKeyboard(dialog) {
|
|
1569
|
+
return [
|
|
1570
|
+
{
|
|
1571
|
+
id: "open-moves-focus-inside",
|
|
1572
|
+
key: "Enter",
|
|
1573
|
+
keys: "{Enter}",
|
|
1574
|
+
requirement: "required",
|
|
1575
|
+
given: { open: false, focus: { part: "trigger" } },
|
|
1576
|
+
result: "Activating the trigger opens the dialog and moves focus to an element inside it.",
|
|
1577
|
+
then: { open: true, focus: { inside: dialog } }
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
id: "tab-wraps",
|
|
1581
|
+
key: "Tab",
|
|
1582
|
+
keys: "{Tab}",
|
|
1583
|
+
requirement: "required",
|
|
1584
|
+
given: { open: true, focus: { part: dialog, tabbable: "last" } },
|
|
1585
|
+
result: "Tab on the last tabbable element moves focus to the first one: focus stays inside.",
|
|
1586
|
+
then: { open: true, focus: { part: dialog, tabbable: "first" } }
|
|
1587
|
+
},
|
|
1588
|
+
{
|
|
1589
|
+
id: "shift-tab-wraps",
|
|
1590
|
+
key: "Shift + Tab",
|
|
1591
|
+
keys: "{Shift>}{Tab}{/Shift}",
|
|
1592
|
+
requirement: "required",
|
|
1593
|
+
given: { open: true, focus: { part: dialog, tabbable: "first" } },
|
|
1594
|
+
result: "Shift + Tab on the first tabbable element moves focus to the last one.",
|
|
1595
|
+
then: { open: true, focus: { part: dialog, tabbable: "last" } }
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
id: "escape-closes",
|
|
1599
|
+
key: "Escape",
|
|
1600
|
+
keys: "{Escape}",
|
|
1601
|
+
requirement: "required",
|
|
1602
|
+
given: { open: true, focus: { inside: dialog } },
|
|
1603
|
+
result: "Escape closes the dialog and returns focus to the element that opened it.",
|
|
1604
|
+
then: { open: false, focus: { part: "trigger" } }
|
|
1605
|
+
}
|
|
1606
|
+
];
|
|
1607
|
+
}
|
|
1608
|
+
var dialogModalPattern = {
|
|
1609
|
+
id: "dialog-modal",
|
|
1610
|
+
name: "Dialog (Modal)",
|
|
1611
|
+
source: "https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/",
|
|
1612
|
+
parts: {
|
|
1613
|
+
trigger: {
|
|
1614
|
+
description: "The element that opens the dialog and gets focus back when it closes.",
|
|
1615
|
+
name: "required",
|
|
1616
|
+
role: "button"
|
|
1617
|
+
},
|
|
1618
|
+
dialog: {
|
|
1619
|
+
description: "The dialog container; every element of the dialog is inside it.",
|
|
1620
|
+
name: "required",
|
|
1621
|
+
role: "dialog",
|
|
1622
|
+
whileOpen: true
|
|
1623
|
+
}
|
|
1624
|
+
},
|
|
1625
|
+
popup: "dialog",
|
|
1626
|
+
opener: { part: "trigger", keys: "{Enter}" },
|
|
1627
|
+
tree: [{ part: "dialog" }],
|
|
1628
|
+
structure: [
|
|
1629
|
+
{
|
|
1630
|
+
id: "dialog-is-modal",
|
|
1631
|
+
requirement: "required",
|
|
1632
|
+
rule: "The dialog container has aria-modal set to true.",
|
|
1633
|
+
target: { part: "dialog" },
|
|
1634
|
+
attribute: "aria-modal",
|
|
1635
|
+
equals: "true"
|
|
1636
|
+
}
|
|
1637
|
+
],
|
|
1638
|
+
keyboard: modalDialogKeyboard("dialog"),
|
|
1639
|
+
ios: {
|
|
1640
|
+
parts: {
|
|
1641
|
+
trigger: {
|
|
1642
|
+
description: "The button that opens the sheet.",
|
|
1643
|
+
name: "required",
|
|
1644
|
+
type: "button"
|
|
1645
|
+
},
|
|
1646
|
+
title: {
|
|
1647
|
+
description: "The sheet's title, which names it.",
|
|
1648
|
+
name: "required",
|
|
1649
|
+
scope: "app",
|
|
1650
|
+
type: "staticText"
|
|
1651
|
+
},
|
|
1652
|
+
close: {
|
|
1653
|
+
description: "The sheet's close action.",
|
|
1654
|
+
name: "required",
|
|
1655
|
+
scope: "app",
|
|
1656
|
+
type: "button"
|
|
1657
|
+
}
|
|
1658
|
+
},
|
|
1659
|
+
structure: [{ target: { part: "trigger", label: "Open project sheet" }, exists: true }],
|
|
1660
|
+
interactions: [
|
|
1661
|
+
{
|
|
1662
|
+
id: "activation-opens-sheet",
|
|
1663
|
+
action: "tap",
|
|
1664
|
+
on: { part: "trigger", label: "Open project sheet" },
|
|
1665
|
+
result: "Opens the sheet, named by its title, with a way to close it.",
|
|
1666
|
+
then: [
|
|
1667
|
+
{ target: { part: "title", label: "Project details" }, exists: true },
|
|
1668
|
+
{ target: { part: "close", label: "Done" }, exists: true }
|
|
1669
|
+
]
|
|
1670
|
+
},
|
|
1671
|
+
{
|
|
1672
|
+
id: "close-dismisses-sheet",
|
|
1673
|
+
action: "tap",
|
|
1674
|
+
on: { part: "close", label: "Done" },
|
|
1675
|
+
result: "Closes the sheet and returns to the view that opened it.",
|
|
1676
|
+
then: [
|
|
1677
|
+
{ target: { part: "title", label: "Project details" }, exists: false },
|
|
1678
|
+
{ target: { part: "trigger", label: "Open project sheet" }, exists: true }
|
|
1679
|
+
]
|
|
1680
|
+
}
|
|
1681
|
+
]
|
|
1682
|
+
}
|
|
1683
|
+
};
|
|
1684
|
+
|
|
1685
|
+
// src/a11y/alert-dialog.ts
|
|
1686
|
+
var alertDialogPattern = {
|
|
1687
|
+
id: "alertdialog",
|
|
1688
|
+
name: "Alert and Message Dialogs",
|
|
1689
|
+
source: "https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog/",
|
|
1690
|
+
parts: {
|
|
1691
|
+
trigger: {
|
|
1692
|
+
description: "The element that opens the alert dialog and gets focus back when it closes.",
|
|
1693
|
+
name: "required",
|
|
1694
|
+
role: "button"
|
|
1695
|
+
},
|
|
1696
|
+
dialog: {
|
|
1697
|
+
description: "The alert dialog container; every element of the dialog is inside it.",
|
|
1698
|
+
name: "required",
|
|
1699
|
+
role: "alertdialog",
|
|
1700
|
+
whileOpen: true
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
popup: "dialog",
|
|
1704
|
+
opener: { part: "trigger", keys: "{Enter}" },
|
|
1705
|
+
tree: [{ part: "dialog" }],
|
|
1706
|
+
structure: [
|
|
1707
|
+
{
|
|
1708
|
+
id: "dialog-is-modal",
|
|
1709
|
+
requirement: "required",
|
|
1710
|
+
rule: "The alert dialog container has aria-modal set to true.",
|
|
1711
|
+
target: { part: "dialog" },
|
|
1712
|
+
attribute: "aria-modal",
|
|
1713
|
+
equals: "true"
|
|
1714
|
+
},
|
|
1715
|
+
{
|
|
1716
|
+
id: "dialog-describes-message",
|
|
1717
|
+
requirement: "required",
|
|
1718
|
+
rule: "aria-describedby refers to the element that holds the alert message.",
|
|
1719
|
+
target: { part: "dialog" },
|
|
1720
|
+
attribute: "aria-describedby",
|
|
1721
|
+
resolves: true
|
|
1722
|
+
}
|
|
1723
|
+
],
|
|
1724
|
+
keyboard: modalDialogKeyboard("dialog"),
|
|
1725
|
+
ios: {
|
|
1726
|
+
parts: {
|
|
1727
|
+
trigger: {
|
|
1728
|
+
description: "The button that asks for confirmation.",
|
|
1729
|
+
name: "required",
|
|
1730
|
+
type: "button"
|
|
1731
|
+
},
|
|
1732
|
+
alert: {
|
|
1733
|
+
description: "The system alert, named by its title.",
|
|
1734
|
+
name: "required",
|
|
1735
|
+
scope: "app",
|
|
1736
|
+
type: "alert"
|
|
1737
|
+
},
|
|
1738
|
+
cancel: {
|
|
1739
|
+
description: "The alert's cancel action.",
|
|
1740
|
+
name: "required",
|
|
1741
|
+
scope: "app",
|
|
1742
|
+
type: "button"
|
|
1743
|
+
}
|
|
1744
|
+
},
|
|
1745
|
+
structure: [{ target: { part: "trigger", at: "first" }, exists: true }],
|
|
1746
|
+
interactions: [
|
|
1747
|
+
{
|
|
1748
|
+
id: "activation-opens-alert",
|
|
1749
|
+
action: "tap",
|
|
1750
|
+
on: { part: "trigger", at: "first" },
|
|
1751
|
+
result: "Opens the alert dialog, named by its title.",
|
|
1752
|
+
then: [{ target: { part: "alert", at: "first" }, exists: true }]
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
id: "cancel-closes-alert",
|
|
1756
|
+
action: "tap",
|
|
1757
|
+
on: { part: "cancel", label: "Cancel" },
|
|
1758
|
+
result: "Closes the alert without performing the action.",
|
|
1759
|
+
then: [{ target: { part: "alert" }, exists: false }]
|
|
1760
|
+
}
|
|
1761
|
+
]
|
|
1762
|
+
}
|
|
1763
|
+
};
|
|
1764
|
+
|
|
1765
|
+
// src/a11y/checkbox.ts
|
|
1766
|
+
function checked(value) {
|
|
1767
|
+
return { target: { part: "checkbox", at: "first" }, attribute: "aria-checked", equals: value };
|
|
1768
|
+
}
|
|
1769
|
+
var checkboxPattern = {
|
|
1770
|
+
id: "checkbox",
|
|
1771
|
+
name: "Checkbox",
|
|
1772
|
+
source: "https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/",
|
|
1773
|
+
parts: {
|
|
1774
|
+
checkbox: {
|
|
1775
|
+
description: "The checkbox, labelled by its content, by aria-labelledby or by aria-label.",
|
|
1776
|
+
name: "required",
|
|
1777
|
+
role: "checkbox"
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
tree: [{ part: "checkbox", states: ["checked"] }],
|
|
1781
|
+
structure: [
|
|
1782
|
+
{
|
|
1783
|
+
id: "checkbox-checked-state",
|
|
1784
|
+
requirement: "required",
|
|
1785
|
+
rule: "The checkbox has aria-checked set to true when checked, false when not checked and mixed when partially checked.",
|
|
1786
|
+
target: { part: "checkbox" },
|
|
1787
|
+
attribute: "aria-checked",
|
|
1788
|
+
equals: ["true", "false", "mixed"]
|
|
1789
|
+
}
|
|
1790
|
+
],
|
|
1791
|
+
keyboard: [
|
|
1792
|
+
{
|
|
1793
|
+
id: "space-toggles",
|
|
1794
|
+
key: "Space",
|
|
1795
|
+
keys: "{ }",
|
|
1796
|
+
requirement: "required",
|
|
1797
|
+
given: { focus: { part: "checkbox", at: "first" }, attributes: [checked("true")] },
|
|
1798
|
+
result: "Changes the state of the checkbox.",
|
|
1799
|
+
then: { focus: { part: "checkbox", at: "first" }, attributes: [checked("false")] }
|
|
1800
|
+
}
|
|
1801
|
+
]
|
|
1802
|
+
};
|
|
1803
|
+
|
|
1804
|
+
// src/a11y/combobox-select-only.ts
|
|
1805
|
+
var EXPANDED = {
|
|
1806
|
+
target: { part: "combobox" },
|
|
1807
|
+
attribute: "aria-expanded",
|
|
1808
|
+
equals: "true"
|
|
1809
|
+
};
|
|
1810
|
+
var COLLAPSED = { ...EXPANDED, equals: "false" };
|
|
1811
|
+
function selected(at) {
|
|
1812
|
+
return { target: { part: "option", at }, attribute: "aria-selected", equals: "true" };
|
|
1813
|
+
}
|
|
1814
|
+
var comboboxSelectOnlyPattern = {
|
|
1815
|
+
id: "combobox-select-only",
|
|
1816
|
+
name: "Select-Only Combobox",
|
|
1817
|
+
source: "https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/",
|
|
1818
|
+
parts: {
|
|
1819
|
+
combobox: {
|
|
1820
|
+
description: "The element that shows the value and opens the listbox, labelled by a label, aria-labelledby or aria-label.",
|
|
1821
|
+
name: "required",
|
|
1822
|
+
role: "combobox"
|
|
1823
|
+
},
|
|
1824
|
+
listbox: {
|
|
1825
|
+
description: "The popup that lists the options.",
|
|
1826
|
+
name: "none",
|
|
1827
|
+
role: "listbox",
|
|
1828
|
+
whileOpen: true
|
|
1829
|
+
},
|
|
1830
|
+
option: {
|
|
1831
|
+
description: "The options of the listbox, each named by its text.",
|
|
1832
|
+
multiple: true,
|
|
1833
|
+
name: "required",
|
|
1834
|
+
role: "option",
|
|
1835
|
+
whileOpen: true,
|
|
1836
|
+
within: "listbox"
|
|
1837
|
+
}
|
|
1838
|
+
},
|
|
1839
|
+
popup: "listbox",
|
|
1840
|
+
opener: { part: "combobox", keys: "{Enter}" },
|
|
1841
|
+
tree: [
|
|
1842
|
+
{ part: "combobox", states: ["expanded"] },
|
|
1843
|
+
{ part: "listbox", children: [{ part: "option", states: ["selected"] }] }
|
|
1844
|
+
],
|
|
1845
|
+
structure: [
|
|
1846
|
+
{
|
|
1847
|
+
id: "combobox-expanded",
|
|
1848
|
+
requirement: "required",
|
|
1849
|
+
rule: "While the listbox is displayed, the combobox has aria-expanded set to true.",
|
|
1850
|
+
...EXPANDED
|
|
1851
|
+
},
|
|
1852
|
+
{
|
|
1853
|
+
id: "combobox-controls-listbox",
|
|
1854
|
+
requirement: "required",
|
|
1855
|
+
rule: "The combobox has aria-controls referring to the listbox.",
|
|
1856
|
+
target: { part: "combobox" },
|
|
1857
|
+
attribute: "aria-controls",
|
|
1858
|
+
references: "listbox"
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
id: "combobox-has-popup",
|
|
1862
|
+
requirement: "optional",
|
|
1863
|
+
rule: "The combobox may set aria-haspopup to listbox, its implicit value.",
|
|
1864
|
+
target: { part: "combobox" },
|
|
1865
|
+
attribute: "aria-haspopup",
|
|
1866
|
+
equals: "listbox"
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
id: "combobox-active-descendant",
|
|
1870
|
+
requirement: "required",
|
|
1871
|
+
rule: "While an option has visual focus, DOM focus stays on the combobox and its aria-activedescendant refers to that option.",
|
|
1872
|
+
target: { part: "combobox" },
|
|
1873
|
+
attribute: "aria-activedescendant",
|
|
1874
|
+
references: "option"
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
id: "option-selected",
|
|
1878
|
+
requirement: "required",
|
|
1879
|
+
rule: "The selected option has aria-selected set to true.",
|
|
1880
|
+
target: { part: "option", at: "selected" },
|
|
1881
|
+
attribute: "aria-selected",
|
|
1882
|
+
equals: "true"
|
|
1883
|
+
}
|
|
1884
|
+
],
|
|
1885
|
+
keyboard: [
|
|
1886
|
+
{
|
|
1887
|
+
id: "enter-opens",
|
|
1888
|
+
key: "Enter",
|
|
1889
|
+
keys: "{Enter}",
|
|
1890
|
+
requirement: "required",
|
|
1891
|
+
given: { open: false, focus: { part: "combobox" } },
|
|
1892
|
+
result: "Opens the listbox without changing the selection; visual focus is on the selected option.",
|
|
1893
|
+
then: {
|
|
1894
|
+
open: true,
|
|
1895
|
+
focus: { part: "option", at: "selected" },
|
|
1896
|
+
attributes: [EXPANDED, selected("first")]
|
|
1897
|
+
}
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
id: "space-opens",
|
|
1901
|
+
key: "Space",
|
|
1902
|
+
keys: "{ }",
|
|
1903
|
+
requirement: "required",
|
|
1904
|
+
given: { open: false, focus: { part: "combobox" } },
|
|
1905
|
+
result: "Opens the listbox without changing the selection; visual focus is on the selected option.",
|
|
1906
|
+
then: {
|
|
1907
|
+
open: true,
|
|
1908
|
+
focus: { part: "option", at: "selected" },
|
|
1909
|
+
attributes: [EXPANDED, selected("first")]
|
|
1910
|
+
}
|
|
1911
|
+
},
|
|
1912
|
+
{
|
|
1913
|
+
id: "down-arrow-opens",
|
|
1914
|
+
key: "Down Arrow",
|
|
1915
|
+
keys: "{ArrowDown}",
|
|
1916
|
+
requirement: "required",
|
|
1917
|
+
given: { open: false, focus: { part: "combobox" } },
|
|
1918
|
+
result: "Opens the listbox without changing the selection; visual focus is on the selected option.",
|
|
1919
|
+
then: {
|
|
1920
|
+
open: true,
|
|
1921
|
+
focus: { part: "option", at: "selected" },
|
|
1922
|
+
attributes: [EXPANDED, selected("first")]
|
|
1923
|
+
}
|
|
1924
|
+
},
|
|
1925
|
+
{
|
|
1926
|
+
id: "alt-down-arrow-opens",
|
|
1927
|
+
key: "Alt + Down Arrow",
|
|
1928
|
+
keys: "{Alt>}{ArrowDown}{/Alt}",
|
|
1929
|
+
requirement: "optional",
|
|
1930
|
+
given: { open: false, focus: { part: "combobox" } },
|
|
1931
|
+
result: "Opens the listbox without changing the selection.",
|
|
1932
|
+
then: { open: true, attributes: [EXPANDED, selected("first")] }
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
id: "up-arrow-opens",
|
|
1936
|
+
key: "Up Arrow",
|
|
1937
|
+
keys: "{ArrowUp}",
|
|
1938
|
+
requirement: "optional",
|
|
1939
|
+
given: { open: false, focus: { part: "combobox" } },
|
|
1940
|
+
result: "Opens the listbox and moves visual focus to the first option.",
|
|
1941
|
+
then: { open: true, focus: { part: "option", at: "first" } }
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
id: "home-opens-at-first",
|
|
1945
|
+
key: "Home",
|
|
1946
|
+
keys: "{Home}",
|
|
1947
|
+
requirement: "optional",
|
|
1948
|
+
given: { open: false, focus: { part: "combobox" } },
|
|
1949
|
+
result: "Opens the listbox and moves visual focus to the first option.",
|
|
1950
|
+
then: { open: true, focus: { part: "option", at: "first" } }
|
|
1951
|
+
},
|
|
1952
|
+
{
|
|
1953
|
+
id: "end-opens-at-last",
|
|
1954
|
+
key: "End",
|
|
1955
|
+
keys: "{End}",
|
|
1956
|
+
requirement: "optional",
|
|
1957
|
+
given: { open: false, focus: { part: "combobox" } },
|
|
1958
|
+
result: "Opens the listbox and moves visual focus to the last option.",
|
|
1959
|
+
then: { open: true, focus: { part: "option", at: "last" } }
|
|
1960
|
+
},
|
|
1961
|
+
{
|
|
1962
|
+
id: "down-arrow-next",
|
|
1963
|
+
key: "Down Arrow",
|
|
1964
|
+
keys: "{ArrowDown}",
|
|
1965
|
+
requirement: "required",
|
|
1966
|
+
given: { open: true, focus: { part: "option", at: "first" } },
|
|
1967
|
+
result: "Moves visual focus to the next option.",
|
|
1968
|
+
then: { open: true, focus: { part: "option", at: 1 } }
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
id: "down-arrow-stops",
|
|
1972
|
+
key: "Down Arrow",
|
|
1973
|
+
keys: "{ArrowDown}",
|
|
1974
|
+
requirement: "required",
|
|
1975
|
+
given: { open: true, focus: { part: "option", at: "last" } },
|
|
1976
|
+
result: "On the last option, visual focus does not move.",
|
|
1977
|
+
then: { open: true, focus: { part: "option", at: "last" } }
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
id: "up-arrow-previous",
|
|
1981
|
+
key: "Up Arrow",
|
|
1982
|
+
keys: "{ArrowUp}",
|
|
1983
|
+
requirement: "required",
|
|
1984
|
+
given: { open: true, focus: { part: "option", at: 1 } },
|
|
1985
|
+
result: "Moves visual focus to the previous option.",
|
|
1986
|
+
then: { open: true, focus: { part: "option", at: "first" } }
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
id: "up-arrow-stops",
|
|
1990
|
+
key: "Up Arrow",
|
|
1991
|
+
keys: "{ArrowUp}",
|
|
1992
|
+
requirement: "required",
|
|
1993
|
+
given: { open: true, focus: { part: "option", at: "first" } },
|
|
1994
|
+
result: "On the first option, visual focus does not move.",
|
|
1995
|
+
then: { open: true, focus: { part: "option", at: "first" } }
|
|
1996
|
+
},
|
|
1997
|
+
{
|
|
1998
|
+
id: "home-first",
|
|
1999
|
+
key: "Home",
|
|
2000
|
+
keys: "{Home}",
|
|
2001
|
+
requirement: "optional",
|
|
2002
|
+
given: { open: true, focus: { part: "option", at: "last" } },
|
|
2003
|
+
result: "Moves visual focus to the first option.",
|
|
2004
|
+
then: { open: true, focus: { part: "option", at: "first" } }
|
|
2005
|
+
},
|
|
2006
|
+
{
|
|
2007
|
+
id: "end-last",
|
|
2008
|
+
key: "End",
|
|
2009
|
+
keys: "{End}",
|
|
2010
|
+
requirement: "optional",
|
|
2011
|
+
given: { open: true, focus: { part: "option", at: "first" } },
|
|
2012
|
+
result: "Moves visual focus to the last option.",
|
|
2013
|
+
then: { open: true, focus: { part: "option", at: "last" } }
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
id: "enter-selects",
|
|
2017
|
+
key: "Enter",
|
|
2018
|
+
keys: "{Enter}",
|
|
2019
|
+
requirement: "required",
|
|
2020
|
+
given: { open: true, focus: { part: "option", at: 1 } },
|
|
2021
|
+
result: "Selects the focused option, closes the listbox and returns focus to the combobox.",
|
|
2022
|
+
then: { open: false, focus: { part: "combobox" }, attributes: [COLLAPSED, selected(1)] }
|
|
2023
|
+
},
|
|
2024
|
+
{
|
|
2025
|
+
id: "space-selects",
|
|
2026
|
+
key: "Space",
|
|
2027
|
+
keys: "{ }",
|
|
2028
|
+
requirement: "required",
|
|
2029
|
+
given: { open: true, focus: { part: "option", at: 1 } },
|
|
2030
|
+
result: "Selects the focused option, closes the listbox and returns focus to the combobox.",
|
|
2031
|
+
then: { open: false, focus: { part: "combobox" }, attributes: [COLLAPSED, selected(1)] }
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
id: "alt-up-arrow-selects",
|
|
2035
|
+
key: "Alt + Up Arrow",
|
|
2036
|
+
keys: "{Alt>}{ArrowUp}{/Alt}",
|
|
2037
|
+
requirement: "optional",
|
|
2038
|
+
given: { open: true, focus: { part: "option", at: 1 } },
|
|
2039
|
+
result: "Selects the focused option, closes the listbox and returns focus to the combobox.",
|
|
2040
|
+
then: { open: false, focus: { part: "combobox" }, attributes: [COLLAPSED, selected(1)] }
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
id: "tab-selects",
|
|
2044
|
+
key: "Tab",
|
|
2045
|
+
keys: "{Tab}",
|
|
2046
|
+
requirement: "required",
|
|
2047
|
+
given: { open: true, focus: { part: "option", at: 1 } },
|
|
2048
|
+
result: "Selects the focused option and closes the listbox.",
|
|
2049
|
+
then: { open: false, attributes: [COLLAPSED, selected(1)] }
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
id: "escape-closes",
|
|
2053
|
+
key: "Escape",
|
|
2054
|
+
keys: "{Escape}",
|
|
2055
|
+
requirement: "required",
|
|
2056
|
+
given: { open: true, focus: { part: "option", at: 1 } },
|
|
2057
|
+
result: "Closes the listbox without changing the selection and returns focus to the combobox.",
|
|
2058
|
+
then: {
|
|
2059
|
+
open: false,
|
|
2060
|
+
focus: { part: "combobox" },
|
|
2061
|
+
attributes: [COLLAPSED, selected("first")]
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
],
|
|
2065
|
+
ios: {
|
|
2066
|
+
parts: {
|
|
2067
|
+
trigger: {
|
|
2068
|
+
description: "A menu-style picker: a button named by its label, with the current value in the label.",
|
|
2069
|
+
name: "required",
|
|
2070
|
+
type: "button"
|
|
2071
|
+
},
|
|
2072
|
+
option: {
|
|
2073
|
+
description: "An option in the list the picker opens; the current one is selected.",
|
|
2074
|
+
name: "required",
|
|
2075
|
+
scope: "popup",
|
|
2076
|
+
type: "button"
|
|
2077
|
+
}
|
|
2078
|
+
},
|
|
2079
|
+
structure: [
|
|
2080
|
+
{ target: { part: "trigger", at: "first" }, labelIncludes: "Draft" },
|
|
2081
|
+
{ target: { part: "trigger", at: "last" }, enabled: false }
|
|
2082
|
+
],
|
|
2083
|
+
interactions: [
|
|
2084
|
+
{
|
|
2085
|
+
id: "activation-opens-options",
|
|
2086
|
+
action: "tap",
|
|
2087
|
+
on: { part: "trigger", at: "first" },
|
|
2088
|
+
result: "Opens the list of options with the current one selected.",
|
|
2089
|
+
then: [
|
|
2090
|
+
{ target: { part: "option" }, exists: true },
|
|
2091
|
+
{ target: { part: "option", label: "Draft" }, selected: true },
|
|
2092
|
+
{ target: { part: "option", label: "Active" }, selected: false }
|
|
2093
|
+
]
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
id: "choosing-an-option-closes-and-updates",
|
|
2097
|
+
action: "tap",
|
|
2098
|
+
on: { part: "option", label: "Active" },
|
|
2099
|
+
result: "Selects the option, closes the list and shows the new value.",
|
|
2100
|
+
then: [
|
|
2101
|
+
{ target: { part: "option" }, exists: false },
|
|
2102
|
+
{ target: { part: "trigger", at: "first" }, labelIncludes: "Active" }
|
|
2103
|
+
]
|
|
2104
|
+
}
|
|
2105
|
+
]
|
|
2106
|
+
}
|
|
2107
|
+
};
|
|
2108
|
+
|
|
2109
|
+
// src/a11y/menu.ts
|
|
2110
|
+
var TRIGGER_EXPANDED = {
|
|
2111
|
+
target: { part: "trigger" },
|
|
2112
|
+
attribute: "aria-expanded",
|
|
2113
|
+
equals: "true"
|
|
2114
|
+
};
|
|
2115
|
+
var TRIGGER_COLLAPSED = { ...TRIGGER_EXPANDED, equals: "false" };
|
|
2116
|
+
var menuButtonPattern = {
|
|
2117
|
+
id: "menu-button",
|
|
2118
|
+
name: "Menu Button",
|
|
2119
|
+
source: "https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/",
|
|
2120
|
+
options: { wrap: ["wrap", "stop"] },
|
|
2121
|
+
parts: {
|
|
2122
|
+
trigger: {
|
|
2123
|
+
description: "The button that opens the menu.",
|
|
2124
|
+
name: "required",
|
|
2125
|
+
role: "button"
|
|
2126
|
+
},
|
|
2127
|
+
menu: {
|
|
2128
|
+
description: "The menu, labelled by the button that controls it or by aria-label.",
|
|
2129
|
+
name: "required",
|
|
2130
|
+
role: "menu",
|
|
2131
|
+
whileOpen: true
|
|
2132
|
+
},
|
|
2133
|
+
item: {
|
|
2134
|
+
description: "The items of the menu.",
|
|
2135
|
+
multiple: true,
|
|
2136
|
+
name: "required",
|
|
2137
|
+
role: "menuitem",
|
|
2138
|
+
whileOpen: true,
|
|
2139
|
+
within: "menu"
|
|
2140
|
+
}
|
|
2141
|
+
},
|
|
2142
|
+
popup: "menu",
|
|
2143
|
+
opener: { part: "trigger", keys: "{Enter}" },
|
|
2144
|
+
tree: [{ part: "menu", children: [{ part: "item" }] }],
|
|
2145
|
+
structure: [
|
|
2146
|
+
{
|
|
2147
|
+
id: "trigger-has-popup",
|
|
2148
|
+
requirement: "required",
|
|
2149
|
+
rule: "The button has aria-haspopup set to menu or true.",
|
|
2150
|
+
target: { part: "trigger" },
|
|
2151
|
+
attribute: "aria-haspopup",
|
|
2152
|
+
equals: ["menu", "true"]
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
id: "trigger-expanded",
|
|
2156
|
+
requirement: "required",
|
|
2157
|
+
rule: "While the menu is displayed, the button has aria-expanded set to true.",
|
|
2158
|
+
...TRIGGER_EXPANDED
|
|
2159
|
+
},
|
|
2160
|
+
{
|
|
2161
|
+
id: "trigger-controls-menu",
|
|
2162
|
+
requirement: "optional",
|
|
2163
|
+
rule: "The button may have aria-controls referring to the menu.",
|
|
2164
|
+
target: { part: "trigger" },
|
|
2165
|
+
attribute: "aria-controls",
|
|
2166
|
+
references: "menu"
|
|
2167
|
+
}
|
|
2168
|
+
],
|
|
2169
|
+
keyboard: [
|
|
2170
|
+
{
|
|
2171
|
+
id: "enter-opens",
|
|
2172
|
+
key: "Enter",
|
|
2173
|
+
keys: "{Enter}",
|
|
2174
|
+
requirement: "required",
|
|
2175
|
+
given: { open: false, focus: { part: "trigger" } },
|
|
2176
|
+
result: "Opens the menu and moves focus to the first item.",
|
|
2177
|
+
then: { open: true, focus: { part: "item", at: "first" }, attributes: [TRIGGER_EXPANDED] }
|
|
2178
|
+
},
|
|
2179
|
+
{
|
|
2180
|
+
id: "space-opens",
|
|
2181
|
+
key: "Space",
|
|
2182
|
+
keys: "{ }",
|
|
2183
|
+
requirement: "required",
|
|
2184
|
+
given: { open: false, focus: { part: "trigger" } },
|
|
2185
|
+
result: "Opens the menu and moves focus to the first item.",
|
|
2186
|
+
then: { open: true, focus: { part: "item", at: "first" }, attributes: [TRIGGER_EXPANDED] }
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
id: "down-arrow-opens",
|
|
2190
|
+
key: "Down Arrow",
|
|
2191
|
+
keys: "{ArrowDown}",
|
|
2192
|
+
requirement: "optional",
|
|
2193
|
+
given: { open: false, focus: { part: "trigger" } },
|
|
2194
|
+
result: "Opens the menu and moves focus to the first item.",
|
|
2195
|
+
then: { open: true, focus: { part: "item", at: "first" } }
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
id: "up-arrow-opens-at-last",
|
|
2199
|
+
key: "Up Arrow",
|
|
2200
|
+
keys: "{ArrowUp}",
|
|
2201
|
+
requirement: "optional",
|
|
2202
|
+
given: { open: false, focus: { part: "trigger" } },
|
|
2203
|
+
result: "Opens the menu and moves focus to the last item.",
|
|
2204
|
+
then: { open: true, focus: { part: "item", at: "last" } }
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
id: "down-arrow-next",
|
|
2208
|
+
key: "Down Arrow",
|
|
2209
|
+
keys: "{ArrowDown}",
|
|
2210
|
+
requirement: "required",
|
|
2211
|
+
given: { open: true, focus: { part: "item", at: "first" } },
|
|
2212
|
+
result: "Moves focus to the next item.",
|
|
2213
|
+
then: { open: true, focus: { part: "item", at: 1 } }
|
|
2214
|
+
},
|
|
2215
|
+
{
|
|
2216
|
+
id: "down-arrow-wraps",
|
|
2217
|
+
key: "Down Arrow",
|
|
2218
|
+
keys: "{ArrowDown}",
|
|
2219
|
+
requirement: "optional",
|
|
2220
|
+
when: { wrap: "wrap" },
|
|
2221
|
+
given: { open: true, focus: { part: "item", at: "last" } },
|
|
2222
|
+
result: "On the last item, moves focus to the first item.",
|
|
2223
|
+
then: { open: true, focus: { part: "item", at: "first" } }
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
id: "down-arrow-stops",
|
|
2227
|
+
key: "Down Arrow",
|
|
2228
|
+
keys: "{ArrowDown}",
|
|
2229
|
+
requirement: "optional",
|
|
2230
|
+
when: { wrap: "stop" },
|
|
2231
|
+
given: { open: true, focus: { part: "item", at: "last" } },
|
|
2232
|
+
result: "On the last item, focus stays on the last item.",
|
|
2233
|
+
then: { open: true, focus: { part: "item", at: "last" } }
|
|
2234
|
+
},
|
|
2235
|
+
{
|
|
2236
|
+
id: "up-arrow-previous",
|
|
2237
|
+
key: "Up Arrow",
|
|
2238
|
+
keys: "{ArrowUp}",
|
|
2239
|
+
requirement: "required",
|
|
2240
|
+
given: { open: true, focus: { part: "item", at: 1 } },
|
|
2241
|
+
result: "Moves focus to the previous item.",
|
|
2242
|
+
then: { open: true, focus: { part: "item", at: "first" } }
|
|
2243
|
+
},
|
|
2244
|
+
{
|
|
2245
|
+
id: "up-arrow-wraps",
|
|
2246
|
+
key: "Up Arrow",
|
|
2247
|
+
keys: "{ArrowUp}",
|
|
2248
|
+
requirement: "optional",
|
|
2249
|
+
when: { wrap: "wrap" },
|
|
2250
|
+
given: { open: true, focus: { part: "item", at: "first" } },
|
|
2251
|
+
result: "On the first item, moves focus to the last item.",
|
|
2252
|
+
then: { open: true, focus: { part: "item", at: "last" } }
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
id: "up-arrow-stops",
|
|
2256
|
+
key: "Up Arrow",
|
|
2257
|
+
keys: "{ArrowUp}",
|
|
2258
|
+
requirement: "optional",
|
|
2259
|
+
when: { wrap: "stop" },
|
|
2260
|
+
given: { open: true, focus: { part: "item", at: "first" } },
|
|
2261
|
+
result: "On the first item, focus stays on the first item.",
|
|
2262
|
+
then: { open: true, focus: { part: "item", at: "first" } }
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
id: "home-first",
|
|
2266
|
+
key: "Home",
|
|
2267
|
+
keys: "{Home}",
|
|
2268
|
+
requirement: "optional",
|
|
2269
|
+
given: { open: true, focus: { part: "item", at: "last" } },
|
|
2270
|
+
result: "Moves focus to the first item.",
|
|
2271
|
+
then: { open: true, focus: { part: "item", at: "first" } }
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
id: "end-last",
|
|
2275
|
+
key: "End",
|
|
2276
|
+
keys: "{End}",
|
|
2277
|
+
requirement: "optional",
|
|
2278
|
+
given: { open: true, focus: { part: "item", at: "first" } },
|
|
2279
|
+
result: "Moves focus to the last item.",
|
|
2280
|
+
then: { open: true, focus: { part: "item", at: "last" } }
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
id: "enter-activates",
|
|
2284
|
+
key: "Enter",
|
|
2285
|
+
keys: "{Enter}",
|
|
2286
|
+
requirement: "required",
|
|
2287
|
+
given: { open: true, focus: { part: "item", at: "first" } },
|
|
2288
|
+
result: "Activates the item and closes the menu.",
|
|
2289
|
+
then: { open: false }
|
|
2290
|
+
},
|
|
2291
|
+
{
|
|
2292
|
+
id: "escape-closes",
|
|
2293
|
+
key: "Escape",
|
|
2294
|
+
keys: "{Escape}",
|
|
2295
|
+
requirement: "required",
|
|
2296
|
+
given: { open: true, focus: { part: "item", at: "first" } },
|
|
2297
|
+
result: "Closes the menu and returns focus to the button that opened it.",
|
|
2298
|
+
then: { open: false, focus: { part: "trigger" }, attributes: [TRIGGER_COLLAPSED] }
|
|
2299
|
+
},
|
|
2300
|
+
{
|
|
2301
|
+
id: "tab-closes",
|
|
2302
|
+
key: "Tab",
|
|
2303
|
+
keys: "{Tab}",
|
|
2304
|
+
requirement: "required",
|
|
2305
|
+
given: { open: true, focus: { part: "item", at: "first" } },
|
|
2306
|
+
result: "Moves focus out of the menu and closes it.",
|
|
2307
|
+
then: { open: false }
|
|
2308
|
+
}
|
|
2309
|
+
],
|
|
2310
|
+
ios: {
|
|
2311
|
+
parts: {
|
|
2312
|
+
trigger: {
|
|
2313
|
+
description: "The menu button, named by its label.",
|
|
2314
|
+
name: "required",
|
|
2315
|
+
type: "button"
|
|
2316
|
+
},
|
|
2317
|
+
item: {
|
|
2318
|
+
description: "A menu item: a button named by its label; a checked choice is selected and an unavailable one disabled.",
|
|
2319
|
+
name: "required",
|
|
2320
|
+
scope: "popup",
|
|
2321
|
+
type: "button"
|
|
2322
|
+
}
|
|
2323
|
+
},
|
|
2324
|
+
structure: [{ target: { part: "trigger", at: "first" }, exists: true }],
|
|
2325
|
+
interactions: [
|
|
2326
|
+
{
|
|
2327
|
+
id: "activation-opens-menu",
|
|
2328
|
+
action: "tap",
|
|
2329
|
+
on: { part: "trigger", at: "first" },
|
|
2330
|
+
result: "Opens the menu.",
|
|
2331
|
+
then: [
|
|
2332
|
+
{ target: { part: "item" }, exists: true },
|
|
2333
|
+
{ target: { part: "item", label: "Show details" }, selected: true },
|
|
2334
|
+
{ target: { part: "item", label: "Unavailable action" }, enabled: false }
|
|
2335
|
+
]
|
|
2336
|
+
},
|
|
2337
|
+
{
|
|
2338
|
+
id: "activating-an-item-closes-menu",
|
|
2339
|
+
action: "tap",
|
|
2340
|
+
on: { part: "item", label: "Duplicate" },
|
|
2341
|
+
result: "Performs the action and closes the menu.",
|
|
2342
|
+
then: [{ target: { part: "item" }, exists: false }]
|
|
2343
|
+
}
|
|
2344
|
+
]
|
|
2345
|
+
}
|
|
2346
|
+
};
|
|
2347
|
+
|
|
2348
|
+
// src/a11y/radio.ts
|
|
2349
|
+
function checked2(at) {
|
|
2350
|
+
return { target: { part: "radio", at }, attribute: "aria-checked", equals: "true" };
|
|
2351
|
+
}
|
|
2352
|
+
function arrow(id, key, keys, from, to, result) {
|
|
2353
|
+
return {
|
|
2354
|
+
id,
|
|
2355
|
+
key,
|
|
2356
|
+
keys,
|
|
2357
|
+
requirement: "required",
|
|
2358
|
+
given: { focus: { part: "radio", at: from } },
|
|
2359
|
+
result,
|
|
2360
|
+
then: {
|
|
2361
|
+
focus: { part: "radio", at: to },
|
|
2362
|
+
attributes: [checked2(to), { ...checked2(from), equals: "false" }]
|
|
2363
|
+
}
|
|
2364
|
+
};
|
|
2365
|
+
}
|
|
2366
|
+
var radioPattern = {
|
|
2367
|
+
id: "radio",
|
|
2368
|
+
name: "Radio Group",
|
|
2369
|
+
source: "https://www.w3.org/WAI/ARIA/apg/patterns/radio/",
|
|
2370
|
+
parts: {
|
|
2371
|
+
radiogroup: {
|
|
2372
|
+
description: "The container of the radios, labelled by aria-labelledby or aria-label.",
|
|
2373
|
+
name: "required",
|
|
2374
|
+
role: "radiogroup"
|
|
2375
|
+
},
|
|
2376
|
+
radio: {
|
|
2377
|
+
description: "The radios, each labelled by its content, by aria-labelledby or by aria-label.",
|
|
2378
|
+
multiple: true,
|
|
2379
|
+
name: "required",
|
|
2380
|
+
role: "radio",
|
|
2381
|
+
within: "radiogroup"
|
|
2382
|
+
}
|
|
2383
|
+
},
|
|
2384
|
+
tree: [{ part: "radiogroup", children: [{ part: "radio", states: ["checked"] }] }],
|
|
2385
|
+
structure: [
|
|
2386
|
+
{
|
|
2387
|
+
id: "radio-checked-state",
|
|
2388
|
+
requirement: "required",
|
|
2389
|
+
rule: "Every radio has aria-checked: true on the checked radio, false on the others.",
|
|
2390
|
+
target: { part: "radio" },
|
|
2391
|
+
attribute: "aria-checked",
|
|
2392
|
+
equals: ["true", "false"]
|
|
2393
|
+
}
|
|
2394
|
+
],
|
|
2395
|
+
keyboard: [
|
|
2396
|
+
{
|
|
2397
|
+
id: "tab-enters-at-checked",
|
|
2398
|
+
key: "Tab",
|
|
2399
|
+
keys: "{Tab}",
|
|
2400
|
+
requirement: "required",
|
|
2401
|
+
given: { focus: "page-start", attributes: [checked2(1)] },
|
|
2402
|
+
result: "When focus moves into the group, it lands on the checked radio.",
|
|
2403
|
+
then: { focus: { part: "radio", at: "checked" } }
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
id: "space-checks",
|
|
2407
|
+
key: "Space",
|
|
2408
|
+
keys: "{ }",
|
|
2409
|
+
requirement: "required",
|
|
2410
|
+
given: {
|
|
2411
|
+
focus: { part: "radio", at: "first" },
|
|
2412
|
+
attributes: [{ ...checked2("first"), equals: "false" }]
|
|
2413
|
+
},
|
|
2414
|
+
result: "Checks the focused radio if it is not already checked.",
|
|
2415
|
+
then: { focus: { part: "radio", at: "first" }, attributes: [checked2("first")] }
|
|
2416
|
+
},
|
|
2417
|
+
arrow(
|
|
2418
|
+
"down-arrow-next",
|
|
2419
|
+
"Down Arrow",
|
|
2420
|
+
"{ArrowDown}",
|
|
2421
|
+
1,
|
|
2422
|
+
2,
|
|
2423
|
+
"Moves focus to the next radio, unchecks the previous one and checks the new one."
|
|
2424
|
+
),
|
|
2425
|
+
arrow(
|
|
2426
|
+
"right-arrow-next",
|
|
2427
|
+
"Right Arrow",
|
|
2428
|
+
"{ArrowRight}",
|
|
2429
|
+
1,
|
|
2430
|
+
2,
|
|
2431
|
+
"Moves focus to the next radio, unchecks the previous one and checks the new one."
|
|
2432
|
+
),
|
|
2433
|
+
arrow(
|
|
2434
|
+
"down-arrow-wraps",
|
|
2435
|
+
"Down Arrow",
|
|
2436
|
+
"{ArrowDown}",
|
|
2437
|
+
"last",
|
|
2438
|
+
"first",
|
|
2439
|
+
"On the last radio, moves focus to the first radio and checks it."
|
|
2440
|
+
),
|
|
2441
|
+
arrow(
|
|
2442
|
+
"up-arrow-previous",
|
|
2443
|
+
"Up Arrow",
|
|
2444
|
+
"{ArrowUp}",
|
|
2445
|
+
1,
|
|
2446
|
+
"first",
|
|
2447
|
+
"Moves focus to the previous radio, unchecks the previous one and checks the new one."
|
|
2448
|
+
),
|
|
2449
|
+
arrow(
|
|
2450
|
+
"left-arrow-previous",
|
|
2451
|
+
"Left Arrow",
|
|
2452
|
+
"{ArrowLeft}",
|
|
2453
|
+
1,
|
|
2454
|
+
"first",
|
|
2455
|
+
"Moves focus to the previous radio, unchecks the previous one and checks the new one."
|
|
2456
|
+
),
|
|
2457
|
+
arrow(
|
|
2458
|
+
"up-arrow-wraps",
|
|
2459
|
+
"Up Arrow",
|
|
2460
|
+
"{ArrowUp}",
|
|
2461
|
+
"first",
|
|
2462
|
+
"last",
|
|
2463
|
+
"On the first radio, moves focus to the last radio and checks it."
|
|
2464
|
+
)
|
|
2465
|
+
],
|
|
2466
|
+
ios: {
|
|
2467
|
+
parts: {
|
|
2468
|
+
group: {
|
|
2469
|
+
description: "The group's label, shown as the heading of its options.",
|
|
2470
|
+
name: "required",
|
|
2471
|
+
type: "staticText"
|
|
2472
|
+
},
|
|
2473
|
+
option: {
|
|
2474
|
+
description: "An option: a button named by its label; the chosen one is selected and an unavailable one disabled.",
|
|
2475
|
+
name: "required",
|
|
2476
|
+
type: "button"
|
|
2477
|
+
}
|
|
2478
|
+
},
|
|
2479
|
+
structure: [
|
|
2480
|
+
{ target: { part: "group", label: "Default project view" }, exists: true },
|
|
2481
|
+
{ target: { part: "option", label: "Grid" }, selected: true },
|
|
2482
|
+
{ target: { part: "option", label: "List" }, selected: false },
|
|
2483
|
+
{ target: { part: "option", label: "Timeline" }, enabled: false }
|
|
2484
|
+
],
|
|
2485
|
+
interactions: [
|
|
2486
|
+
{
|
|
2487
|
+
id: "activation-selects-option",
|
|
2488
|
+
action: "tap",
|
|
2489
|
+
on: { part: "option", label: "List" },
|
|
2490
|
+
result: "Selects the option and clears the previous selection.",
|
|
2491
|
+
then: [
|
|
2492
|
+
{ target: { part: "option", label: "List" }, selected: true },
|
|
2493
|
+
{ target: { part: "option", label: "Grid" }, selected: false }
|
|
2494
|
+
]
|
|
2495
|
+
}
|
|
2496
|
+
]
|
|
2497
|
+
}
|
|
2498
|
+
};
|
|
2499
|
+
|
|
2500
|
+
// src/a11y/switch.ts
|
|
2501
|
+
function checked3(value) {
|
|
2502
|
+
return { target: { part: "switch", at: "first" }, attribute: "aria-checked", equals: value };
|
|
2503
|
+
}
|
|
2504
|
+
var switchPattern = {
|
|
2505
|
+
id: "switch",
|
|
2506
|
+
name: "Switch",
|
|
2507
|
+
source: "https://www.w3.org/WAI/ARIA/apg/patterns/switch/",
|
|
2508
|
+
parts: {
|
|
2509
|
+
switch: {
|
|
2510
|
+
description: "The switch, labelled by its content, by aria-labelledby or by aria-label.",
|
|
2511
|
+
name: "required",
|
|
2512
|
+
role: "switch"
|
|
2513
|
+
}
|
|
2514
|
+
},
|
|
2515
|
+
tree: [{ part: "switch", states: ["checked"] }],
|
|
2516
|
+
structure: [
|
|
2517
|
+
{
|
|
2518
|
+
id: "switch-checked-state",
|
|
2519
|
+
requirement: "required",
|
|
2520
|
+
rule: "The switch has aria-checked set to true when on and to false when off.",
|
|
2521
|
+
target: { part: "switch" },
|
|
2522
|
+
attribute: "aria-checked",
|
|
2523
|
+
equals: ["true", "false"]
|
|
2524
|
+
}
|
|
2525
|
+
],
|
|
2526
|
+
keyboard: [
|
|
2527
|
+
{
|
|
2528
|
+
id: "space-toggles",
|
|
2529
|
+
key: "Space",
|
|
2530
|
+
keys: "{ }",
|
|
2531
|
+
requirement: "required",
|
|
2532
|
+
given: { focus: { part: "switch", at: "first" }, attributes: [checked3("true")] },
|
|
2533
|
+
result: "Changes the state of the switch.",
|
|
2534
|
+
then: { focus: { part: "switch", at: "first" }, attributes: [checked3("false")] }
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
id: "enter-toggles",
|
|
2538
|
+
key: "Enter",
|
|
2539
|
+
keys: "{Enter}",
|
|
2540
|
+
requirement: "optional",
|
|
2541
|
+
given: { focus: { part: "switch", at: "first" }, attributes: [checked3("true")] },
|
|
2542
|
+
result: "Changes the state of the switch.",
|
|
2543
|
+
then: { focus: { part: "switch", at: "first" }, attributes: [checked3("false")] }
|
|
2544
|
+
}
|
|
2545
|
+
],
|
|
2546
|
+
ios: {
|
|
2547
|
+
parts: {
|
|
2548
|
+
switch: {
|
|
2549
|
+
description: "A switch, named by its title (and description), with a value of 1 or 0.",
|
|
2550
|
+
name: "required",
|
|
2551
|
+
type: "switch"
|
|
2552
|
+
}
|
|
2553
|
+
},
|
|
2554
|
+
structure: [
|
|
2555
|
+
{ target: { part: "switch", at: "first" }, value: "1" },
|
|
2556
|
+
{ target: { part: "switch", at: "last" }, value: "0" }
|
|
2557
|
+
],
|
|
2558
|
+
interactions: [
|
|
2559
|
+
{
|
|
2560
|
+
id: "activation-turns-off",
|
|
2561
|
+
action: "tap",
|
|
2562
|
+
on: { part: "switch", at: "first" },
|
|
2563
|
+
result: "Changes the state of the switch.",
|
|
2564
|
+
then: [{ target: { part: "switch", at: "first" }, value: "0" }]
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
id: "activation-turns-on",
|
|
2568
|
+
action: "tap",
|
|
2569
|
+
on: { part: "switch", at: "first" },
|
|
2570
|
+
result: "Changes the state of the switch back.",
|
|
2571
|
+
then: [{ target: { part: "switch", at: "first" }, value: "1" }]
|
|
2572
|
+
}
|
|
2573
|
+
]
|
|
2574
|
+
}
|
|
2575
|
+
};
|
|
2576
|
+
|
|
2577
|
+
// src/a11y/tabs.ts
|
|
2578
|
+
function selected2(at) {
|
|
2579
|
+
return { target: { part: "tab", at }, attribute: "aria-selected", equals: "true" };
|
|
2580
|
+
}
|
|
2581
|
+
var tabsPattern = {
|
|
2582
|
+
id: "tabs",
|
|
2583
|
+
name: "Tabs",
|
|
2584
|
+
source: "https://www.w3.org/WAI/ARIA/apg/patterns/tabs/",
|
|
2585
|
+
options: { activation: ["automatic", "manual"] },
|
|
2586
|
+
parts: {
|
|
2587
|
+
tablist: {
|
|
2588
|
+
description: "The container of the tabs, labelled by aria-labelledby or aria-label.",
|
|
2589
|
+
name: "required",
|
|
2590
|
+
role: "tablist"
|
|
2591
|
+
},
|
|
2592
|
+
tab: {
|
|
2593
|
+
description: "The tabs, each the label of one panel.",
|
|
2594
|
+
multiple: true,
|
|
2595
|
+
name: "required",
|
|
2596
|
+
role: "tab",
|
|
2597
|
+
within: "tablist"
|
|
2598
|
+
},
|
|
2599
|
+
panel: {
|
|
2600
|
+
description: "The panel of the selected tab, labelled by that tab.",
|
|
2601
|
+
name: "required",
|
|
2602
|
+
role: "tabpanel"
|
|
2603
|
+
}
|
|
2604
|
+
},
|
|
2605
|
+
tree: [{ part: "tablist", children: [{ part: "tab", states: ["selected"] }] }, { part: "panel" }],
|
|
2606
|
+
structure: [
|
|
2607
|
+
{
|
|
2608
|
+
id: "tab-selection-state",
|
|
2609
|
+
requirement: "required",
|
|
2610
|
+
rule: "Every tab has aria-selected: true on the selected tab, false on the others.",
|
|
2611
|
+
target: { part: "tab" },
|
|
2612
|
+
attribute: "aria-selected",
|
|
2613
|
+
equals: ["true", "false"]
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
id: "tab-controls-panel",
|
|
2617
|
+
requirement: "required",
|
|
2618
|
+
rule: "Each tab has aria-controls referring to its panel.",
|
|
2619
|
+
target: { part: "tab", at: "selected" },
|
|
2620
|
+
attribute: "aria-controls",
|
|
2621
|
+
references: "panel"
|
|
2622
|
+
},
|
|
2623
|
+
{
|
|
2624
|
+
id: "panel-labelled-by-tab",
|
|
2625
|
+
requirement: "required",
|
|
2626
|
+
rule: "Each panel has aria-labelledby referring to its tab.",
|
|
2627
|
+
target: { part: "panel" },
|
|
2628
|
+
attribute: "aria-labelledby",
|
|
2629
|
+
references: "tab"
|
|
2630
|
+
}
|
|
2631
|
+
],
|
|
2632
|
+
keyboard: [
|
|
2633
|
+
{
|
|
2634
|
+
id: "tab-enters-at-selected",
|
|
2635
|
+
key: "Tab",
|
|
2636
|
+
keys: "{Tab}",
|
|
2637
|
+
requirement: "required",
|
|
2638
|
+
given: { focus: "page-start" },
|
|
2639
|
+
result: "When focus moves into the tab list, it lands on the selected tab.",
|
|
2640
|
+
then: { focus: { part: "tab", at: "selected" } }
|
|
2641
|
+
},
|
|
2642
|
+
{
|
|
2643
|
+
id: "tab-leaves-to-panel",
|
|
2644
|
+
key: "Tab",
|
|
2645
|
+
keys: "{Tab}",
|
|
2646
|
+
requirement: "required",
|
|
2647
|
+
given: { focus: { part: "tab", at: "selected" } },
|
|
2648
|
+
result: "From the tab list, Tab moves focus to the next element in the page: the panel.",
|
|
2649
|
+
then: { focus: { part: "panel" } }
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
id: "right-arrow-next",
|
|
2653
|
+
key: "Right Arrow",
|
|
2654
|
+
keys: "{ArrowRight}",
|
|
2655
|
+
requirement: "required",
|
|
2656
|
+
given: { focus: { part: "tab", at: "first" }, attributes: [selected2("first")] },
|
|
2657
|
+
result: "Moves focus to the next tab.",
|
|
2658
|
+
then: { focus: { part: "tab", at: 1 } }
|
|
2659
|
+
},
|
|
2660
|
+
{
|
|
2661
|
+
id: "right-arrow-selects",
|
|
2662
|
+
key: "Right Arrow",
|
|
2663
|
+
keys: "{ArrowRight}",
|
|
2664
|
+
requirement: "required",
|
|
2665
|
+
when: { activation: "automatic" },
|
|
2666
|
+
given: { focus: { part: "tab", at: "first" }, attributes: [selected2("first")] },
|
|
2667
|
+
result: "With automatic activation, the tab that receives focus is selected.",
|
|
2668
|
+
then: { focus: { part: "tab", at: 1 }, attributes: [selected2(1)] }
|
|
2669
|
+
},
|
|
2670
|
+
{
|
|
2671
|
+
id: "right-arrow-keeps-selection",
|
|
2672
|
+
key: "Right Arrow",
|
|
2673
|
+
keys: "{ArrowRight}",
|
|
2674
|
+
requirement: "required",
|
|
2675
|
+
when: { activation: "manual" },
|
|
2676
|
+
given: { focus: { part: "tab", at: "first" }, attributes: [selected2("first")] },
|
|
2677
|
+
result: "With manual activation, moving focus does not change the selected tab.",
|
|
2678
|
+
then: { focus: { part: "tab", at: 1 }, attributes: [selected2("first")] }
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
id: "right-arrow-wraps",
|
|
2682
|
+
key: "Right Arrow",
|
|
2683
|
+
keys: "{ArrowRight}",
|
|
2684
|
+
requirement: "required",
|
|
2685
|
+
given: { focus: { part: "tab", at: "last" } },
|
|
2686
|
+
result: "On the last tab, moves focus to the first tab.",
|
|
2687
|
+
then: { focus: { part: "tab", at: "first" } }
|
|
2688
|
+
},
|
|
2689
|
+
{
|
|
2690
|
+
id: "left-arrow-previous",
|
|
2691
|
+
key: "Left Arrow",
|
|
2692
|
+
keys: "{ArrowLeft}",
|
|
2693
|
+
requirement: "required",
|
|
2694
|
+
given: { focus: { part: "tab", at: 1 } },
|
|
2695
|
+
result: "Moves focus to the previous tab.",
|
|
2696
|
+
then: { focus: { part: "tab", at: "first" } }
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
id: "left-arrow-wraps",
|
|
2700
|
+
key: "Left Arrow",
|
|
2701
|
+
keys: "{ArrowLeft}",
|
|
2702
|
+
requirement: "required",
|
|
2703
|
+
given: { focus: { part: "tab", at: "first" } },
|
|
2704
|
+
result: "On the first tab, moves focus to the last tab.",
|
|
2705
|
+
then: { focus: { part: "tab", at: "last" } }
|
|
2706
|
+
},
|
|
2707
|
+
{
|
|
2708
|
+
id: "home-first",
|
|
2709
|
+
key: "Home",
|
|
2710
|
+
keys: "{Home}",
|
|
2711
|
+
requirement: "optional",
|
|
2712
|
+
given: { focus: { part: "tab", at: "last" } },
|
|
2713
|
+
result: "Moves focus to the first tab.",
|
|
2714
|
+
then: { focus: { part: "tab", at: "first" } }
|
|
2715
|
+
},
|
|
2716
|
+
{
|
|
2717
|
+
id: "end-last",
|
|
2718
|
+
key: "End",
|
|
2719
|
+
keys: "{End}",
|
|
2720
|
+
requirement: "optional",
|
|
2721
|
+
given: { focus: { part: "tab", at: "first" } },
|
|
2722
|
+
result: "Moves focus to the last tab.",
|
|
2723
|
+
then: { focus: { part: "tab", at: "last" } }
|
|
2724
|
+
},
|
|
2725
|
+
{
|
|
2726
|
+
id: "enter-selects",
|
|
2727
|
+
key: "Enter",
|
|
2728
|
+
keys: "{Enter}",
|
|
2729
|
+
requirement: "required",
|
|
2730
|
+
when: { activation: "manual" },
|
|
2731
|
+
given: { focus: { part: "tab", at: 1 }, attributes: [selected2("first")] },
|
|
2732
|
+
result: "Selects the focused tab and shows its panel.",
|
|
2733
|
+
then: { focus: { part: "tab", at: 1 }, attributes: [selected2(1)] }
|
|
2734
|
+
},
|
|
2735
|
+
{
|
|
2736
|
+
id: "space-selects",
|
|
2737
|
+
key: "Space",
|
|
2738
|
+
keys: "{ }",
|
|
2739
|
+
requirement: "required",
|
|
2740
|
+
when: { activation: "manual" },
|
|
2741
|
+
given: { focus: { part: "tab", at: 1 }, attributes: [selected2("first")] },
|
|
2742
|
+
result: "Selects the focused tab and shows its panel.",
|
|
2743
|
+
then: { focus: { part: "tab", at: 1 }, attributes: [selected2(1)] }
|
|
2744
|
+
}
|
|
2745
|
+
],
|
|
2746
|
+
ios: {
|
|
2747
|
+
parts: {
|
|
2748
|
+
tab: {
|
|
2749
|
+
description: "A segment of the segmented picker above the content: a button named by its label; the shown section is selected.",
|
|
2750
|
+
name: "required",
|
|
2751
|
+
type: "button"
|
|
2752
|
+
},
|
|
2753
|
+
panel: {
|
|
2754
|
+
description: "Text of the selected section's content.",
|
|
2755
|
+
name: "required",
|
|
2756
|
+
type: "staticText"
|
|
2757
|
+
}
|
|
2758
|
+
},
|
|
2759
|
+
structure: [
|
|
2760
|
+
{ target: { part: "tab", label: "Overview" }, selected: true },
|
|
2761
|
+
{ target: { part: "tab", label: "Activity" }, selected: false },
|
|
2762
|
+
{ target: { part: "panel", label: "Project summary and current status." }, exists: true }
|
|
2763
|
+
],
|
|
2764
|
+
interactions: [
|
|
2765
|
+
{
|
|
2766
|
+
id: "activation-selects-tab",
|
|
2767
|
+
action: "tap",
|
|
2768
|
+
on: { part: "tab", label: "Activity" },
|
|
2769
|
+
result: "Selects the tab and shows its content in place of the previous one.",
|
|
2770
|
+
then: [
|
|
2771
|
+
{ target: { part: "tab", label: "Activity" }, selected: true },
|
|
2772
|
+
{ target: { part: "tab", label: "Overview" }, selected: false },
|
|
2773
|
+
{ target: { part: "panel", label: "Recent project changes." }, exists: true },
|
|
2774
|
+
{
|
|
2775
|
+
target: { part: "panel", label: "Project summary and current status." },
|
|
2776
|
+
exists: false
|
|
2777
|
+
}
|
|
2778
|
+
]
|
|
2779
|
+
}
|
|
2780
|
+
]
|
|
2781
|
+
}
|
|
2782
|
+
};
|
|
2783
|
+
|
|
2784
|
+
// src/a11y/index.ts
|
|
2785
|
+
var a11yPatterns = {
|
|
2786
|
+
accordion: accordionPattern,
|
|
2787
|
+
alertdialog: alertDialogPattern,
|
|
2788
|
+
checkbox: checkboxPattern,
|
|
2789
|
+
"combobox-select-only": comboboxSelectOnlyPattern,
|
|
2790
|
+
"dialog-modal": dialogModalPattern,
|
|
2791
|
+
"menu-button": menuButtonPattern,
|
|
2792
|
+
radio: radioPattern,
|
|
2793
|
+
switch: switchPattern,
|
|
2794
|
+
tabs: tabsPattern
|
|
2795
|
+
};
|
|
2796
|
+
function getA11yPattern(id) {
|
|
2797
|
+
return a11yPatterns[id];
|
|
2798
|
+
}
|
|
2799
|
+
|
|
1358
2800
|
// src/components/animated-check/animated-check-contract.ts
|
|
1359
2801
|
var animatedCheckVariants = ["animated", "static"];
|
|
1360
2802
|
var animatedCheckStates = ["mounting", "drawn", "reduced-motion"];
|
|
@@ -1443,6 +2885,7 @@ var accordionVisualArchetypes = [
|
|
|
1443
2885
|
"trigger"
|
|
1444
2886
|
];
|
|
1445
2887
|
var accordionContract = {
|
|
2888
|
+
accessibility: { pattern: "accordion", options: { collapse: "collapsible", expand: "single" } },
|
|
1446
2889
|
defaultIconVariant: "chevron",
|
|
1447
2890
|
iconVariants: accordionIconVariants,
|
|
1448
2891
|
slots: accordionSlots,
|
|
@@ -1481,7 +2924,12 @@ var autocompleteStates = [
|
|
|
1481
2924
|
"empty",
|
|
1482
2925
|
"loading"
|
|
1483
2926
|
];
|
|
1484
|
-
var autocompleteVisualArchetypes = [
|
|
2927
|
+
var autocompleteVisualArchetypes = [
|
|
2928
|
+
"field",
|
|
2929
|
+
"trigger",
|
|
2930
|
+
"overlay",
|
|
2931
|
+
"menu"
|
|
2932
|
+
];
|
|
1485
2933
|
var autocompleteContract = {
|
|
1486
2934
|
defaultSize: "default",
|
|
1487
2935
|
sizes: autocompleteSizes,
|
|
@@ -1534,6 +2982,7 @@ var alertDialogVisualArchetypes = [
|
|
|
1534
2982
|
"action"
|
|
1535
2983
|
];
|
|
1536
2984
|
var alertDialogContract = {
|
|
2985
|
+
accessibility: { pattern: "alertdialog" },
|
|
1537
2986
|
defaultFooterVariant: "default",
|
|
1538
2987
|
defaultSize: "default",
|
|
1539
2988
|
defaultVariant: "default",
|
|
@@ -1616,7 +3065,10 @@ var buttonGroupSlots = [
|
|
|
1616
3065
|
"button-group-separator"
|
|
1617
3066
|
];
|
|
1618
3067
|
var buttonGroupStates = ["rest", "focus-within"];
|
|
1619
|
-
var buttonGroupVisualArchetypes = [
|
|
3068
|
+
var buttonGroupVisualArchetypes = [
|
|
3069
|
+
"action",
|
|
3070
|
+
"segment"
|
|
3071
|
+
];
|
|
1620
3072
|
var buttonGroupContract = {
|
|
1621
3073
|
defaultOrientation: "horizontal",
|
|
1622
3074
|
defaultSize: "default",
|
|
@@ -1748,7 +3200,11 @@ var carouselStates = [
|
|
|
1748
3200
|
"cursor-active",
|
|
1749
3201
|
"can-scroll"
|
|
1750
3202
|
];
|
|
1751
|
-
var carouselVisualArchetypes = [
|
|
3203
|
+
var carouselVisualArchetypes = [
|
|
3204
|
+
"surface",
|
|
3205
|
+
"overlay",
|
|
3206
|
+
"action"
|
|
3207
|
+
];
|
|
1752
3208
|
var carouselContract = {
|
|
1753
3209
|
defaultOrientation: "horizontal",
|
|
1754
3210
|
orientations: carouselOrientations,
|
|
@@ -1788,7 +3244,11 @@ var calendarStates = [
|
|
|
1788
3244
|
"outside",
|
|
1789
3245
|
"disabled"
|
|
1790
3246
|
];
|
|
1791
|
-
var calendarVisualArchetypes = [
|
|
3247
|
+
var calendarVisualArchetypes = [
|
|
3248
|
+
"surface",
|
|
3249
|
+
"action",
|
|
3250
|
+
"choice"
|
|
3251
|
+
];
|
|
1792
3252
|
var calendarContract = {
|
|
1793
3253
|
defaultSelectionMode: "single",
|
|
1794
3254
|
selectionModes: calendarSelectionModes,
|
|
@@ -1809,6 +3269,7 @@ var checkboxStates = [
|
|
|
1809
3269
|
var checkboxSlots = ["checkbox", "checkbox-indicator"];
|
|
1810
3270
|
var checkboxVisualArchetypes = ["choice"];
|
|
1811
3271
|
var checkboxContract = {
|
|
3272
|
+
accessibility: { pattern: "checkbox" },
|
|
1812
3273
|
defaultSize: "md",
|
|
1813
3274
|
sizes: checkboxSizes,
|
|
1814
3275
|
states: checkboxStates,
|
|
@@ -1844,7 +3305,12 @@ var commandStates = [
|
|
|
1844
3305
|
"disabled",
|
|
1845
3306
|
"focus-visible"
|
|
1846
3307
|
];
|
|
1847
|
-
var commandVisualArchetypes = [
|
|
3308
|
+
var commandVisualArchetypes = [
|
|
3309
|
+
"overlay",
|
|
3310
|
+
"surface",
|
|
3311
|
+
"field",
|
|
3312
|
+
"menu"
|
|
3313
|
+
];
|
|
1848
3314
|
var commandContract = {
|
|
1849
3315
|
slots: commandSlots,
|
|
1850
3316
|
states: commandStates,
|
|
@@ -1882,7 +3348,10 @@ var contextMenuStates = [
|
|
|
1882
3348
|
"submenu-open",
|
|
1883
3349
|
"destructive"
|
|
1884
3350
|
];
|
|
1885
|
-
var contextMenuVisualArchetypes = [
|
|
3351
|
+
var contextMenuVisualArchetypes = [
|
|
3352
|
+
"menu",
|
|
3353
|
+
"overlay"
|
|
3354
|
+
];
|
|
1886
3355
|
var contextMenuContract = {
|
|
1887
3356
|
slots: contextMenuSlots,
|
|
1888
3357
|
states: contextMenuStates,
|
|
@@ -1984,6 +3453,7 @@ var dialogVisualArchetypes = [
|
|
|
1984
3453
|
"action"
|
|
1985
3454
|
];
|
|
1986
3455
|
var dialogContract = {
|
|
3456
|
+
accessibility: { pattern: "dialog-modal" },
|
|
1987
3457
|
defaultFooterVariant: "default",
|
|
1988
3458
|
defaultMobilePlacement: "bottom",
|
|
1989
3459
|
defaultSize: "default",
|
|
@@ -2083,6 +3553,7 @@ var dropdownMenuVisualArchetypes = [
|
|
|
2083
3553
|
"choice"
|
|
2084
3554
|
];
|
|
2085
3555
|
var dropdownMenuContract = {
|
|
3556
|
+
accessibility: { pattern: "menu-button", options: { wrap: "wrap" } },
|
|
2086
3557
|
defaultItemVariant: "default",
|
|
2087
3558
|
itemVariants: dropdownMenuItemVariants,
|
|
2088
3559
|
slots: dropdownMenuSlots,
|
|
@@ -2249,6 +3720,8 @@ var frameContract = {
|
|
|
2249
3720
|
visualArchetypes: frameVisualArchetypes,
|
|
2250
3721
|
presets: framePresets
|
|
2251
3722
|
};
|
|
3723
|
+
|
|
3724
|
+
// src/components/frame/frame-chrome.ts
|
|
2252
3725
|
function resolveFrameChrome({
|
|
2253
3726
|
variant = frameContract.defaultVariant,
|
|
2254
3727
|
tray,
|
|
@@ -2279,14 +3752,6 @@ var inputTokenSlots = [
|
|
|
2279
3752
|
"field.fontSize"
|
|
2280
3753
|
];
|
|
2281
3754
|
var inputVisualArchetypes = ["field"];
|
|
2282
|
-
var inputGroupSlots = [
|
|
2283
|
-
"input-group",
|
|
2284
|
-
"input-group-addon",
|
|
2285
|
-
"input-group-button",
|
|
2286
|
-
"input-group-text"
|
|
2287
|
-
];
|
|
2288
|
-
var inputGroupAligns = ["inline-start", "inline-end", "block-start", "block-end"];
|
|
2289
|
-
var inputGroupVisualArchetypes = ["field"];
|
|
2290
3755
|
var inputContract = {
|
|
2291
3756
|
defaultSize: "md",
|
|
2292
3757
|
slots: inputSlots,
|
|
@@ -2295,6 +3760,14 @@ var inputContract = {
|
|
|
2295
3760
|
sizes: inputSizes,
|
|
2296
3761
|
visualArchetypes: inputVisualArchetypes
|
|
2297
3762
|
};
|
|
3763
|
+
var inputGroupSlots = [
|
|
3764
|
+
"input-group",
|
|
3765
|
+
"input-group-addon",
|
|
3766
|
+
"input-group-button",
|
|
3767
|
+
"input-group-text"
|
|
3768
|
+
];
|
|
3769
|
+
var inputGroupAligns = ["inline-start", "inline-end", "block-start", "block-end"];
|
|
3770
|
+
var inputGroupVisualArchetypes = ["field"];
|
|
2298
3771
|
var inputGroupContract = {
|
|
2299
3772
|
aligns: inputGroupAligns,
|
|
2300
3773
|
slots: inputGroupSlots,
|
|
@@ -2618,6 +4091,7 @@ var radioStates = ["unchecked", "checked", "focus-visible", "disabled", "invalid
|
|
|
2618
4091
|
var radioSlots = ["radio-group", "radio", "radio-indicator"];
|
|
2619
4092
|
var radioVisualArchetypes = ["choice"];
|
|
2620
4093
|
var radioContract = {
|
|
4094
|
+
accessibility: { pattern: "radio" },
|
|
2621
4095
|
defaultSize: "md",
|
|
2622
4096
|
sizes: radioSizes,
|
|
2623
4097
|
states: radioStates,
|
|
@@ -2796,6 +4270,31 @@ var selectVisualArchetypes = [
|
|
|
2796
4270
|
"menu"
|
|
2797
4271
|
];
|
|
2798
4272
|
var selectContract = {
|
|
4273
|
+
accessibility: {
|
|
4274
|
+
pattern: "combobox-select-only",
|
|
4275
|
+
knownGaps: [
|
|
4276
|
+
{
|
|
4277
|
+
check: "combobox-active-descendant",
|
|
4278
|
+
reason: "Base UI Select moves DOM focus onto the options instead of keeping it on the combobox with aria-activedescendant, and has no option to change it. The APG Combobox pattern requires DOM focus to stay on the combobox (https://www.w3.org/WAI/ARIA/apg/patterns/combobox/), so this is a gap, not a variant. Screen readers still announce the focused option."
|
|
4279
|
+
},
|
|
4280
|
+
{
|
|
4281
|
+
check: "home-opens-at-first",
|
|
4282
|
+
reason: "Base UI Select 1.6.0 does not open the listbox on Home; only Enter, Space and the arrow keys open it. See docs/design-system/audits/base-ui-issue-drafts.md."
|
|
4283
|
+
},
|
|
4284
|
+
{
|
|
4285
|
+
check: "end-opens-at-last",
|
|
4286
|
+
reason: "Base UI Select 1.6.0 does not open the listbox on End; only Enter, Space and the arrow keys open it. See docs/design-system/audits/base-ui-issue-drafts.md."
|
|
4287
|
+
},
|
|
4288
|
+
{
|
|
4289
|
+
check: "alt-up-arrow-selects",
|
|
4290
|
+
reason: "Base UI Select 1.6.0 treats Alt + Up Arrow as Up Arrow: it moves the highlight and keeps the listbox open. See docs/design-system/audits/base-ui-issue-drafts.md."
|
|
4291
|
+
},
|
|
4292
|
+
{
|
|
4293
|
+
check: "tab-selects",
|
|
4294
|
+
reason: "Base UI Select 1.6.0 closes the listbox on Tab without selecting the highlighted option. See docs/design-system/audits/base-ui-issue-drafts.md."
|
|
4295
|
+
}
|
|
4296
|
+
]
|
|
4297
|
+
},
|
|
2799
4298
|
defaultSize: "md",
|
|
2800
4299
|
sizes: selectSizes,
|
|
2801
4300
|
slots: selectSlots,
|
|
@@ -3004,6 +4503,7 @@ var switchStates = ["off", "on", "hover", "pressed", "focus-visible", "disabled"
|
|
|
3004
4503
|
var switchSlots = ["switch", "switch-thumb"];
|
|
3005
4504
|
var switchVisualArchetypes = ["choice"];
|
|
3006
4505
|
var switchContract = {
|
|
4506
|
+
accessibility: { pattern: "switch" },
|
|
3007
4507
|
defaultSize: "md",
|
|
3008
4508
|
sizes: switchSizes,
|
|
3009
4509
|
slots: switchSlots,
|
|
@@ -3046,6 +4546,7 @@ var tabsVisualArchetypes = [
|
|
|
3046
4546
|
"surface"
|
|
3047
4547
|
];
|
|
3048
4548
|
var tabsContract = {
|
|
4549
|
+
accessibility: { pattern: "tabs", options: { activation: "manual" } },
|
|
3049
4550
|
defaultVariant: "default",
|
|
3050
4551
|
defaultSize: "default",
|
|
3051
4552
|
variants: tabsVariants,
|
|
@@ -3244,6 +4745,6 @@ var defaultUIEnvironment = {
|
|
|
3244
4745
|
theme: personalizationAxes.theme.default
|
|
3245
4746
|
};
|
|
3246
4747
|
|
|
3247
|
-
export { accordionContract, accordionIconVariants, accordionSlots, accordionStates, accordionVisualArchetypes, alertContract, alertDialogContract, alertDialogFooterVariants, alertDialogSizes, alertDialogSlots, alertDialogStates, alertDialogVariants, alertDialogVisualArchetypes, alertSlots, alertVariants, alertVisualArchetypes, animatedCheckContract, animatedCheckSlots, animatedCheckStates, animatedCheckVariants, animatedCheckVisualArchetypes, autocompleteContract, autocompleteSizes, autocompleteSlots, autocompleteStates, autocompleteVisualArchetypes, avatarCompositions, avatarContract, avatarSizes, avatarSlots, avatarStates, avatarVisualArchetypes, badgeContract, badgePaletteVariants, badgeSemanticVariants, badgeSizes, badgeSlots, badgeSolidVariants, badgeStates, badgeVariants, badgeVisualArchetypes, brands, breadcrumbCompositions, breadcrumbContract, breadcrumbSlots, breadcrumbStates, breadcrumbVisualArchetypes, buttonContract, buttonGroupContract, buttonGroupOrientations, buttonGroupSizes, buttonGroupSlots, buttonGroupStates, buttonGroupVisualArchetypes, buttonSizes, buttonSlots, buttonStates, buttonTokenSlots, buttonVariants, buttonVisualArchetypes, calendarContract, calendarSelectionModes, calendarSlots, calendarStates, calendarVisualArchetypes, cardContentPaddings, cardContract, cardLineClamps, cardPaddings, cardSlots, cardStates, cardVariants, cardVisualArchetypes, carouselContract, carouselOrientations, carouselSlots, carouselStates, carouselVisualArchetypes, checkboxContract, checkboxSizes, checkboxSlots, checkboxStates, checkboxVisualArchetypes, collapsibleContract, collapsibleSlots, collapsibleStates, collapsibleVisualArchetypes, commandContract, commandSlots, commandStates, commandVisualArchetypes, connectedPanelAligns, connectedPanelContract, connectedPanelSlots, connectedPanelStates, connectedPanelVisualArchetypes, contextMenuContract, contextMenuSlots, contextMenuStates, contextMenuVisualArchetypes, copyButtonContract, copyButtonSizePairs, copyButtonSizes, copyButtonSlots, copyButtonStates, copyButtonVariants, copyButtonVisualArchetypes, crossRendererContracts, defaultUIEnvironment, densities, designLanguages, destinationKinds, destinationLinkContract, destinationLinkSlots, destinationLinkStates, destinationLinkVisualArchetypes, dialogContract, dialogFooterVariants, dialogMobilePlacements, dialogSizes, dialogSlots, dialogStates, dialogVisualArchetypes, drawerContract, drawerDirections, drawerFooterVariants, drawerSlots, drawerStates, drawerVisualArchetypes, dropdownMenuContract, dropdownMenuItemVariants, dropdownMenuSlots, dropdownMenuStates, dropdownMenuVisualArchetypes, emptyContract, emptyMediaVariants, emptySlots, emptyStates, emptyVisualArchetypes, feedbackStateContract, feedbackStateKinds, feedbackStateSizes, feedbackStateSlots, feedbackStateStates, feedbackStateVisualArchetypes, fieldContract, fieldLegendVariants, fieldOrientations, fieldSlots, fieldStates, fieldVisualArchetypes, fonts, formContract, formSlots, formStates, formVisualArchetypes, frameBorders, frameContract, framePanelSurfaces, framePresets, frameSlots, frameStates, frameTrays, frameVariants, frameVisualArchetypes, getCrossRendererContract, hoverCardContract, hoverCardSlots, hoverCardStates, hoverCardVisualArchetypes, iconThemes, inputContract, inputGroupAligns, inputGroupContract, inputGroupSlots, inputGroupVisualArchetypes, inputOTPContract, inputOTPSlots, inputOTPStates, inputOTPVisualArchetypes, inputSizes, inputSlots, inputStates, inputTokenSlots, inputVisualArchetypes, inputs, itemContract, itemMediaVariants, itemSizes, itemSlots, itemStates, itemVariants, itemVisualArchetypes, kbdContract, kbdSizes, kbdSlots, kbdStates, kbdVisualArchetypes, labelContract, labelSlots, labelStates, labelVisualArchetypes, loadMoreTriggerContract, loadMoreTriggerSlots, loadMoreTriggerStates, loadMoreTriggerVariants, loadMoreTriggerVisualArchetypes, marqueeContract, marqueeOrientations, marqueeSlots, marqueeStates, marqueeVisualArchetypes, menuContract, menuItemVariants, menuSlots, menuStates, menuTones, menuVisualArchetypes, menubarContract, menubarSlots, menubarStates, menubarVisualArchetypes, modes, navigationMenuContract, navigationMenuSlots, navigationMenuStates, navigationMenuVisualArchetypes, osSystems, paginationContract, paginationSlots, paginationStates, paginationVisualArchetypes, panelSettingButtonContract, panelSettingButtonSlots, panelSettingButtonStates, panelSettingButtonVisualArchetypes, personalizationAxes, popoverContract, popoverSlots, popoverStates, popoverVisualArchetypes, portalContainerContract, portalContainerStates, portalContainerTargets, portalContainerVisualArchetypes, previewCardContract, previewCardSlots, previewCardStates, previewCardVisualArchetypes, progressContract, progressSlots, progressStates, progressVisualArchetypes, radii, radioContract, radioSizes, radioSlots, radioStates, radioVisualArchetypes, resizableContract, resizableOrientations, resizableSlots, resizableStates, resizableVariants, resizableVisualArchetypes, resolveFrameChrome, scrollAreaContract, scrollAreaOptions, scrollAreaOrientations, scrollAreaSlots, scrollAreaStates, scrollAreaVisualArchetypes, scrollableListContract, scrollableListLayouts, scrollableListOptions, scrollableListSlots, scrollableListStates, scrollableListVisualArchetypes, searchFieldContract, searchFieldSlots, searchFieldStates, searchFieldVisualArchetypes, segmentedControlContract, segmentedControlSizes, segmentedControlSlots, segmentedControlStates, segmentedControlTones, segmentedControlVariants, segmentedControlVisualArchetypes, selectContract, selectSizes, selectSlots, selectStates, selectTokenSlots, selectVisualArchetypes, selectionTokenSlots, separatorContract, separatorModes, separatorOrientations, separatorSlots, separatorVariants, separatorVisualArchetypes, sheetContract, sheetFooterVariants, sheetSides, sheetSlots, sheetStates, sheetVariants, sheetVisualArchetypes, sidebarCollapsibles, sidebarContract, sidebarMenuButtonSizes, sidebarMenuButtonVariants, sidebarMenuSubButtonSizes, sidebarNavTreeContract, sidebarNavTreeParts, sidebarNavTreeStates, sidebarNavTreeVisualArchetypes, sidebarSides, sidebarSlots, sidebarStates, sidebarVariants, sidebarVisualArchetypes, skeletonContract, skeletonSlots, skeletonStates, skeletonVisualArchetypes, sliderContract, sliderModes, sliderOrientations, sliderSlots, sliderStates, sliderVisualArchetypes, spinnerContract, spinnerSlots, spinnerStates, spinnerVisualArchetypes, surfaces, switchContract, switchSizes, switchSlots, switchStates, switchVisualArchetypes, tableContract, tableSlots, tableStates, tableVariants, tableVisualArchetypes, tabsContract, tabsOrientations, tabsSizes, tabsSlots, tabsStates, tabsVariants, tabsVisualArchetypes, textTickerContract, textTickerSlots, textTickerStates, textTickerVariants, textTickerVisualArchetypes, textareaContract, textareaSizes, textareaSlots, textareaStates, textareaTokenSlots, textareaVisualArchetypes, themes, toasterContract, toasterSlots, toasterStates, toasterTones, toasterVisualArchetypes, toggleContract, toggleGroupContract, toggleGroupOrientations, toggleGroupSelectionModes, toggleGroupSlots, toggleGroupStates, toggleGroupTokenSlots, toggleGroupVisualArchetypes, toggleSizes, toggleSlots, toggleStates, toggleTokenSlots, toggleTones, toggleVisualArchetypes, tooltipAlignments, tooltipContract, tooltipSides, tooltipSlots, tooltipStates, tooltipTokenSlots, tooltipVisualArchetypes, typeScales, visualArchetypeIds, visualArchetypes };
|
|
4748
|
+
export { a11yPatterns, accordionContract, accordionIconVariants, accordionPattern, accordionSlots, accordionStates, accordionVisualArchetypes, alertContract, alertDialogContract, alertDialogFooterVariants, alertDialogPattern, alertDialogSizes, alertDialogSlots, alertDialogStates, alertDialogVariants, alertDialogVisualArchetypes, alertSlots, alertVariants, alertVisualArchetypes, animatedCheckContract, animatedCheckSlots, animatedCheckStates, animatedCheckVariants, animatedCheckVisualArchetypes, autocompleteContract, autocompleteSizes, autocompleteSlots, autocompleteStates, autocompleteVisualArchetypes, avatarCompositions, avatarContract, avatarSizes, avatarSlots, avatarStates, avatarVisualArchetypes, badgeContract, badgePaletteVariants, badgeSemanticVariants, badgeSizes, badgeSlots, badgeSolidVariants, badgeStates, badgeVariants, badgeVisualArchetypes, brands, breadcrumbCompositions, breadcrumbContract, breadcrumbSlots, breadcrumbStates, breadcrumbVisualArchetypes, buttonContract, buttonGroupContract, buttonGroupOrientations, buttonGroupSizes, buttonGroupSlots, buttonGroupStates, buttonGroupVisualArchetypes, buttonSizes, buttonSlots, buttonStates, buttonTokenSlots, buttonVariants, buttonVisualArchetypes, calendarContract, calendarSelectionModes, calendarSlots, calendarStates, calendarVisualArchetypes, cardContentPaddings, cardContract, cardLineClamps, cardPaddings, cardSlots, cardStates, cardVariants, cardVisualArchetypes, carouselContract, carouselOrientations, carouselSlots, carouselStates, carouselVisualArchetypes, checkboxContract, checkboxPattern, checkboxSizes, checkboxSlots, checkboxStates, checkboxVisualArchetypes, collapsibleContract, collapsibleSlots, collapsibleStates, collapsibleVisualArchetypes, comboboxSelectOnlyPattern, commandContract, commandSlots, commandStates, commandVisualArchetypes, connectedPanelAligns, connectedPanelContract, connectedPanelSlots, connectedPanelStates, connectedPanelVisualArchetypes, contextMenuContract, contextMenuSlots, contextMenuStates, contextMenuVisualArchetypes, copyButtonContract, copyButtonSizePairs, copyButtonSizes, copyButtonSlots, copyButtonStates, copyButtonVariants, copyButtonVisualArchetypes, crossRendererContracts, defaultUIEnvironment, densities, designLanguages, destinationKinds, destinationLinkContract, destinationLinkSlots, destinationLinkStates, destinationLinkVisualArchetypes, dialogContract, dialogFooterVariants, dialogMobilePlacements, dialogModalPattern, dialogSizes, dialogSlots, dialogStates, dialogVisualArchetypes, drawerContract, drawerDirections, drawerFooterVariants, drawerSlots, drawerStates, drawerVisualArchetypes, dropdownMenuContract, dropdownMenuItemVariants, dropdownMenuSlots, dropdownMenuStates, dropdownMenuVisualArchetypes, emptyContract, emptyMediaVariants, emptySlots, emptyStates, emptyVisualArchetypes, feedbackStateContract, feedbackStateKinds, feedbackStateSizes, feedbackStateSlots, feedbackStateStates, feedbackStateVisualArchetypes, fieldContract, fieldLegendVariants, fieldOrientations, fieldSlots, fieldStates, fieldVisualArchetypes, fonts, formContract, formSlots, formStates, formVisualArchetypes, frameBorders, frameContract, framePanelSurfaces, framePresets, frameSlots, frameStates, frameTrays, frameVariants, frameVisualArchetypes, getA11yPattern, getCrossRendererContract, hoverCardContract, hoverCardSlots, hoverCardStates, hoverCardVisualArchetypes, iconThemes, inputContract, inputGroupAligns, inputGroupContract, inputGroupSlots, inputGroupVisualArchetypes, inputOTPContract, inputOTPSlots, inputOTPStates, inputOTPVisualArchetypes, inputSizes, inputSlots, inputStates, inputTokenSlots, inputVisualArchetypes, inputs, itemContract, itemMediaVariants, itemSizes, itemSlots, itemStates, itemVariants, itemVisualArchetypes, kbdContract, kbdSizes, kbdSlots, kbdStates, kbdVisualArchetypes, labelContract, labelSlots, labelStates, labelVisualArchetypes, loadMoreTriggerContract, loadMoreTriggerSlots, loadMoreTriggerStates, loadMoreTriggerVariants, loadMoreTriggerVisualArchetypes, marqueeContract, marqueeOrientations, marqueeSlots, marqueeStates, marqueeVisualArchetypes, menuButtonPattern, menuContract, menuItemVariants, menuSlots, menuStates, menuTones, menuVisualArchetypes, menubarContract, menubarSlots, menubarStates, menubarVisualArchetypes, modes, navigationMenuContract, navigationMenuSlots, navigationMenuStates, navigationMenuVisualArchetypes, osSystems, paginationContract, paginationSlots, paginationStates, paginationVisualArchetypes, panelSettingButtonContract, panelSettingButtonSlots, panelSettingButtonStates, panelSettingButtonVisualArchetypes, personalizationAxes, popoverContract, popoverSlots, popoverStates, popoverVisualArchetypes, portalContainerContract, portalContainerStates, portalContainerTargets, portalContainerVisualArchetypes, previewCardContract, previewCardSlots, previewCardStates, previewCardVisualArchetypes, progressContract, progressSlots, progressStates, progressVisualArchetypes, radii, radioContract, radioPattern, radioSizes, radioSlots, radioStates, radioVisualArchetypes, resizableContract, resizableOrientations, resizableSlots, resizableStates, resizableVariants, resizableVisualArchetypes, resolveFrameChrome, scrollAreaContract, scrollAreaOptions, scrollAreaOrientations, scrollAreaSlots, scrollAreaStates, scrollAreaVisualArchetypes, scrollableListContract, scrollableListLayouts, scrollableListOptions, scrollableListSlots, scrollableListStates, scrollableListVisualArchetypes, searchFieldContract, searchFieldSlots, searchFieldStates, searchFieldVisualArchetypes, segmentedControlContract, segmentedControlSizes, segmentedControlSlots, segmentedControlStates, segmentedControlTones, segmentedControlVariants, segmentedControlVisualArchetypes, selectContract, selectSizes, selectSlots, selectStates, selectTokenSlots, selectVisualArchetypes, selectionTokenSlots, separatorContract, separatorModes, separatorOrientations, separatorSlots, separatorVariants, separatorVisualArchetypes, sheetContract, sheetFooterVariants, sheetSides, sheetSlots, sheetStates, sheetVariants, sheetVisualArchetypes, sidebarCollapsibles, sidebarContract, sidebarMenuButtonSizes, sidebarMenuButtonVariants, sidebarMenuSubButtonSizes, sidebarNavTreeContract, sidebarNavTreeParts, sidebarNavTreeStates, sidebarNavTreeVisualArchetypes, sidebarSides, sidebarSlots, sidebarStates, sidebarVariants, sidebarVisualArchetypes, skeletonContract, skeletonSlots, skeletonStates, skeletonVisualArchetypes, sliderContract, sliderModes, sliderOrientations, sliderSlots, sliderStates, sliderVisualArchetypes, spinnerContract, spinnerSlots, spinnerStates, spinnerVisualArchetypes, surfaces, switchContract, switchPattern, switchSizes, switchSlots, switchStates, switchVisualArchetypes, tableContract, tableSlots, tableStates, tableVariants, tableVisualArchetypes, tabsContract, tabsOrientations, tabsPattern, tabsSizes, tabsSlots, tabsStates, tabsVariants, tabsVisualArchetypes, textTickerContract, textTickerSlots, textTickerStates, textTickerVariants, textTickerVisualArchetypes, textareaContract, textareaSizes, textareaSlots, textareaStates, textareaTokenSlots, textareaVisualArchetypes, themes, toasterContract, toasterSlots, toasterStates, toasterTones, toasterVisualArchetypes, toggleContract, toggleGroupContract, toggleGroupOrientations, toggleGroupSelectionModes, toggleGroupSlots, toggleGroupStates, toggleGroupTokenSlots, toggleGroupVisualArchetypes, toggleSizes, toggleSlots, toggleStates, toggleTokenSlots, toggleTones, toggleVisualArchetypes, tooltipAlignments, tooltipContract, tooltipSides, tooltipSlots, tooltipStates, tooltipTokenSlots, tooltipVisualArchetypes, typeScales, visualArchetypeIds, visualArchetypes };
|
|
3248
4749
|
//# sourceMappingURL=index.js.map
|
|
3249
4750
|
//# sourceMappingURL=index.js.map
|