@xdev-asia/ui 0.0.0-stage → 4.15.1
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/AGENTS.md +66 -0
- package/LICENSE +202 -0
- package/README.md +149 -2
- package/assets/brand/mobile/android-background-1024.png +0 -0
- package/assets/brand/mobile/android-background.svg +13 -0
- package/assets/brand/mobile/android-foreground-1024.png +0 -0
- package/assets/brand/mobile/android-foreground.svg +13 -0
- package/assets/brand/mobile/android-monochrome-1024.png +0 -0
- package/assets/brand/mobile/android-monochrome.svg +3 -0
- package/assets/brand/mobile/ios-icon-1024.png +0 -0
- package/assets/brand/mobile/ios-icon-dark-1024.png +0 -0
- package/assets/brand/mobile/ios-icon-dark.svg +22 -0
- package/assets/brand/mobile/ios-icon.svg +22 -0
- package/assets/brand/systems/xdev-ui-icon.svg +23 -0
- package/assets/brand/systems/xdev-ui-lockup-dark.svg +24 -0
- package/assets/brand/systems/xdev-ui-lockup-light.svg +24 -0
- package/assets/brand/systems/xdev-ui-mark-lit.svg +13 -0
- package/assets/brand/systems/xdev-ui-mark.svg +3 -0
- package/assets/brand/xdev-icon-512.png +0 -0
- package/assets/brand/xdev-icon-blue.svg +23 -0
- package/assets/brand/xdev-icon.svg +23 -0
- package/assets/brand/xdev-lockup-dark.svg +24 -0
- package/assets/brand/xdev-lockup-light.svg +24 -0
- package/assets/brand/xdev-mark-lit.svg +13 -0
- package/assets/brand/xdev-mark-tile.svg +3 -0
- package/assets/brand/xdev-mark.svg +3 -0
- package/bin/xdev-ui-skills.mjs +142 -0
- package/dist/Workspace.stories.d.ts +15 -0
- package/dist/ai-manifest.json +3727 -0
- package/dist/chunks/FileDrop-C-ygn8kF.js +891 -0
- package/dist/chunks/FileDrop-C-ygn8kF.js.map +1 -0
- package/dist/chunks/Popover-Ds4RBtZv.js +121 -0
- package/dist/chunks/Popover-Ds4RBtZv.js.map +1 -0
- package/dist/chunks/crop-CahE3q01.js +55 -0
- package/dist/chunks/crop-CahE3q01.js.map +1 -0
- package/dist/chunks/modal-BYFY08ti.js +54 -0
- package/dist/chunks/modal-BYFY08ti.js.map +1 -0
- package/dist/components/ActionTile/ActionTile.d.ts +14 -0
- package/dist/components/ActionTile/ActionTile.stories.d.ts +18 -0
- package/dist/components/ActivityBar/ActivityBar.d.ts +36 -0
- package/dist/components/ActivityBar/ActivityBar.stories.d.ts +27 -0
- package/dist/components/AgentChip/AgentChip.d.ts +10 -0
- package/dist/components/AgentChip/AgentChip.stories.d.ts +21 -0
- package/dist/components/AgentRow/AgentRow.d.ts +24 -0
- package/dist/components/AgentRow/AgentRow.stories.d.ts +19 -0
- package/dist/components/AppShell/AppShell.d.ts +58 -0
- package/dist/components/AppShell/AppShell.stories.d.ts +17 -0
- package/dist/components/ApprovalBar/ApprovalBar.d.ts +23 -0
- package/dist/components/ApprovalBar/ApprovalBar.stories.d.ts +18 -0
- package/dist/components/AttentionInbox/AttentionInbox.d.ts +43 -0
- package/dist/components/AttentionInbox/AttentionInbox.stories.d.ts +16 -0
- package/dist/components/AudioPreview/AudioPreview.d.ts +33 -0
- package/dist/components/AudioPreview/AudioPreview.stories.d.ts +23 -0
- package/dist/components/AudioPreview/audio-preview-store.d.ts +14 -0
- package/dist/components/AuthShell/AuthShell.d.ts +24 -0
- package/dist/components/AuthShell/AuthShell.stories.d.ts +20 -0
- package/dist/components/Avatar/Avatar.d.ts +13 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +21 -0
- package/dist/components/Badge/Badge.d.ts +14 -0
- package/dist/components/Badge/Badge.stories.d.ts +26 -0
- package/dist/components/Banner/Banner.d.ts +11 -0
- package/dist/components/Banner/Banner.stories.d.ts +23 -0
- package/dist/components/BarChart/BarChart.d.ts +20 -0
- package/dist/components/BarChart/BarChart.stories.d.ts +24 -0
- package/dist/components/Board/Board.d.ts +9 -0
- package/dist/components/Board/Board.stories.d.ts +18 -0
- package/dist/components/BoardCard/BoardCard.d.ts +32 -0
- package/dist/components/BoardColumn/BoardColumn.d.ts +24 -0
- package/dist/components/BottomNav/BottomNav.d.ts +40 -0
- package/dist/components/BottomNav/BottomNav.stories.d.ts +40 -0
- package/dist/components/BrandMark/BrandMark.d.ts +20 -0
- package/dist/components/BrandMark/BrandMark.stories.d.ts +28 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +22 -0
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +27 -0
- package/dist/components/BulkBar/BulkBar.d.ts +21 -0
- package/dist/components/BulkBar/BulkBar.stories.d.ts +16 -0
- package/dist/components/Button/Button.d.ts +42 -0
- package/dist/components/Button/Button.stories.d.ts +41 -0
- package/dist/components/Card/Card.d.ts +22 -0
- package/dist/components/Card/Card.stories.d.ts +307 -0
- package/dist/components/Checkbox/Checkbox.d.ts +10 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +18 -0
- package/dist/components/Coachmark/Coachmark.d.ts +31 -0
- package/dist/components/Coachmark/Coachmark.stories.d.ts +27 -0
- package/dist/components/Coachmark/placeCoachmark.d.ts +31 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +19 -0
- package/dist/components/CodeBlock/CodeBlock.stories.d.ts +22 -0
- package/dist/components/CodeInput/CodeInput.d.ts +25 -0
- package/dist/components/CodeInput/CodeInput.stories.d.ts +32 -0
- package/dist/components/CodeInput/normalizeCode.d.ts +10 -0
- package/dist/components/ColorField/ColorField.d.ts +29 -0
- package/dist/components/Combobox/Combobox.d.ts +105 -0
- package/dist/components/Combobox/Combobox.stories.d.ts +42 -0
- package/dist/components/CommandPalette/CommandPalette.d.ts +94 -0
- package/dist/components/CommandPalette/CommandPalette.stories.d.ts +39 -0
- package/dist/components/Comment/Comment.d.ts +25 -0
- package/dist/components/Comment/Comment.stories.d.ts +24 -0
- package/dist/components/CommitGraph/CommitGraph.d.ts +15 -0
- package/dist/components/CommitGraph/CommitGraph.stories.d.ts +15 -0
- package/dist/components/CommitGraph/graphLanes.d.ts +56 -0
- package/dist/components/Composer/Composer.d.ts +31 -0
- package/dist/components/Composer/Composer.stories.d.ts +17 -0
- package/dist/components/Container/Container.d.ts +11 -0
- package/dist/components/Container/Container.stories.d.ts +14 -0
- package/dist/components/DataTable/DataTable.d.ts +79 -0
- package/dist/components/DataTable/DataTable.stories.d.ts +26 -0
- package/dist/components/DataTable/table-helpers.d.ts +16 -0
- package/dist/components/DataTable/table-reorder.d.ts +40 -0
- package/dist/components/DatePicker/Calendar.d.ts +51 -0
- package/dist/components/DatePicker/DatePicker.d.ts +51 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts +42 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +59 -0
- package/dist/components/DateRangePicker/DateRangePicker.stories.d.ts +42 -0
- package/dist/components/DescriptionList/DescriptionList.d.ts +14 -0
- package/dist/components/DescriptionList/DescriptionList.stories.d.ts +21 -0
- package/dist/components/Dialog/Dialog.d.ts +43 -0
- package/dist/components/Dialog/Dialog.stories.d.ts +22 -0
- package/dist/components/DiffStat/DiffStat.d.ts +12 -0
- package/dist/components/DiffStat/DiffStat.stories.d.ts +15 -0
- package/dist/components/Disclosure/Disclosure.d.ts +18 -0
- package/dist/components/Disclosure/Disclosure.stories.d.ts +27 -0
- package/dist/components/DonutChart/DonutChart.d.ts +30 -0
- package/dist/components/DonutChart/DonutChart.stories.d.ts +26 -0
- package/dist/components/Drawer/Drawer.d.ts +27 -0
- package/dist/components/Drawer/Drawer.stories.d.ts +18 -0
- package/dist/components/Emblem/Emblem.d.ts +19 -0
- package/dist/components/Emblem/Emblem.stories.d.ts +19 -0
- package/dist/components/EmptyState/EmptyState.d.ts +43 -0
- package/dist/components/EmptyState/EmptyState.stories.d.ts +17 -0
- package/dist/components/EndpointPanel/EndpointPanel.d.ts +29 -0
- package/dist/components/FacetFilter/FacetFilter.d.ts +39 -0
- package/dist/components/FacetFilter/FacetFilter.stories.d.ts +23 -0
- package/dist/components/FacetFilter/facet-helpers.d.ts +5 -0
- package/dist/components/Field/Field.d.ts +27 -0
- package/dist/components/Field/Field.stories.d.ts +25 -0
- package/dist/components/FieldMessage/FieldMessage.d.ts +10 -0
- package/dist/components/FieldMessage/FieldMessage.stories.d.ts +14 -0
- package/dist/components/FileDrop/FileDrop.d.ts +72 -0
- package/dist/components/FileDrop/FileDrop.stories.d.ts +18 -0
- package/dist/components/FileIcon/FileIcon.d.ts +25 -0
- package/dist/components/FileIcon/FileIcon.stories.d.ts +14 -0
- package/dist/components/FilterChip/FilterChip.d.ts +9 -0
- package/dist/components/FilterChip/FilterChip.stories.d.ts +19 -0
- package/dist/components/FlowMap/FlowMap.d.ts +74 -0
- package/dist/components/FlowMap/FlowMap.stories.d.ts +24 -0
- package/dist/components/FontField/FontField.d.ts +15 -0
- package/dist/components/FontField/FontField.stories.d.ts +17 -0
- package/dist/components/FormDialog/FormDialog.d.ts +40 -0
- package/dist/components/FormDialog/FormDialog.stories.d.ts +22 -0
- package/dist/components/FormSection/FormSection.d.ts +19 -0
- package/dist/components/FormSection/FormSection.stories.d.ts +16 -0
- package/dist/components/Grid/Grid.d.ts +23 -0
- package/dist/components/Grid/Grid.stories.d.ts +19 -0
- package/dist/components/Grid/breakpoints.d.ts +25 -0
- package/dist/components/Heatmap/Heatmap.d.ts +22 -0
- package/dist/components/Heatmap/Heatmap.stories.d.ts +24 -0
- package/dist/components/Icon/Icon.d.ts +14 -0
- package/dist/components/Icon/Icon.stories.d.ts +20 -0
- package/dist/components/IconButton/IconButton.d.ts +16 -0
- package/dist/components/IconButton/IconButton.stories.d.ts +27 -0
- package/dist/components/Identity/Identity.d.ts +14 -0
- package/dist/components/Identity/Identity.stories.d.ts +14 -0
- package/dist/components/Kbd/Kbd.d.ts +5 -0
- package/dist/components/Kbd/Kbd.stories.d.ts +13 -0
- package/dist/components/Label/Label.d.ts +15 -0
- package/dist/components/Label/Label.stories.d.ts +16 -0
- package/dist/components/LaunchCard/LaunchCard.d.ts +36 -0
- package/dist/components/LaunchCard/LaunchCard.stories.d.ts +32 -0
- package/dist/components/List/List.d.ts +11 -0
- package/dist/components/List/List.stories.d.ts +13 -0
- package/dist/components/ListRow/ListRow.d.ts +20 -0
- package/dist/components/ListRow/ListRow.stories.d.ts +27 -0
- package/dist/components/Menu/Menu.d.ts +53 -0
- package/dist/components/Menu/Menu.stories.d.ts +85 -0
- package/dist/components/Menu/MenuButton.d.ts +23 -0
- package/dist/components/Menu/MenuButton.stories.d.ts +46 -0
- package/dist/components/Menu/menu-keys.d.ts +26 -0
- package/dist/components/Meter/Meter.d.ts +18 -0
- package/dist/components/Meter/Meter.stories.d.ts +34 -0
- package/dist/components/ModelChip/ModelChip.d.ts +26 -0
- package/dist/components/ModelChip/ModelChip.stories.d.ts +18 -0
- package/dist/components/NavList/NavList.d.ts +56 -0
- package/dist/components/NavList/NavList.stories.d.ts +25 -0
- package/dist/components/PageHeader/PageHeader.d.ts +14 -0
- package/dist/components/PageHeader/PageHeader.stories.d.ts +14 -0
- package/dist/components/Pagination/Pagination.d.ts +28 -0
- package/dist/components/Pagination/Pagination.stories.d.ts +16 -0
- package/dist/components/PairingCode/PairingCode.d.ts +17 -0
- package/dist/components/PairingCode/PairingCode.stories.d.ts +24 -0
- package/dist/components/PaletteTrigger/PaletteTrigger.d.ts +16 -0
- package/dist/components/PanZoom/PanZoom.d.ts +24 -0
- package/dist/components/PanZoom/PanZoom.stories.d.ts +11 -0
- package/dist/components/Popover/Popover.d.ts +24 -0
- package/dist/components/Popover/Popover.stories.d.ts +25 -0
- package/dist/components/Prose/Prose.d.ts +8 -0
- package/dist/components/Prose/Prose.stories.d.ts +12 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +27 -0
- package/dist/components/RadioGroup/RadioGroup.stories.d.ts +22 -0
- package/dist/components/ReactionBar/ReactionBar.d.ts +21 -0
- package/dist/components/ReactionBar/ReactionBar.stories.d.ts +26 -0
- package/dist/components/ResourceCard/ResourceCard.d.ts +30 -0
- package/dist/components/ResourceCard/ResourceCard.stories.d.ts +19 -0
- package/dist/components/ReviewComment/ReviewComment.d.ts +41 -0
- package/dist/components/ReviewComment/ReviewComment.stories.d.ts +19 -0
- package/dist/components/RouteDiagram/RouteDiagram.d.ts +27 -0
- package/dist/components/RunTimeline/RunTimeline.d.ts +28 -0
- package/dist/components/RunTimeline/RunTimeline.stories.d.ts +31 -0
- package/dist/components/SaveBar/SaveBar.d.ts +56 -0
- package/dist/components/SaveBar/SaveBar.stories.d.ts +16 -0
- package/dist/components/SearchInput/SearchInput.d.ts +22 -0
- package/dist/components/SearchInput/SearchInput.stories.d.ts +18 -0
- package/dist/components/SearchPicker/SearchPicker.d.ts +49 -0
- package/dist/components/SearchPicker/SearchPicker.stories.d.ts +33 -0
- package/dist/components/Segmented/Segmented.d.ts +18 -0
- package/dist/components/Segmented/Segmented.stories.d.ts +18 -0
- package/dist/components/Select/Select.d.ts +26 -0
- package/dist/components/Select/Select.stories.d.ts +22 -0
- package/dist/components/ServiceStatus/ServiceStatus.d.ts +13 -0
- package/dist/components/SessionBar/SessionBar.d.ts +33 -0
- package/dist/components/SessionBar/SessionBar.stories.d.ts +27 -0
- package/dist/components/SettingRow/SettingRow.d.ts +17 -0
- package/dist/components/SettingRow/SettingRow.stories.d.ts +26 -0
- package/dist/components/SettingsShell/SettingsShell.d.ts +52 -0
- package/dist/components/SettingsShell/SettingsShell.stories.d.ts +9 -0
- package/dist/components/ShellTitle/ShellTitle.d.ts +25 -0
- package/dist/components/SiteShell/SiteShell.d.ts +24 -0
- package/dist/components/SiteShell/SiteShell.stories.d.ts +18 -0
- package/dist/components/Skeleton/Skeleton.d.ts +20 -0
- package/dist/components/Skeleton/Skeleton.stories.d.ts +15 -0
- package/dist/components/SortableList/SortableList.d.ts +30 -0
- package/dist/components/SortableList/SortableList.stories.d.ts +16 -0
- package/dist/components/Spinner/Spinner.d.ts +15 -0
- package/dist/components/Spinner/Spinner.stories.d.ts +14 -0
- package/dist/components/SplitHandle/SplitHandle.d.ts +25 -0
- package/dist/components/SplitHandle/SplitHandle.stories.d.ts +18 -0
- package/dist/components/Stack/Stack.d.ts +18 -0
- package/dist/components/Stack/Stack.stories.d.ts +12 -0
- package/dist/components/StatTile/StatTile.d.ts +30 -0
- package/dist/components/StatTile/StatTile.stories.d.ts +32 -0
- package/dist/components/StatusBar/StatusBar.d.ts +8 -0
- package/dist/components/StatusBar/StatusBar.stories.d.ts +15 -0
- package/dist/components/StatusDot/StatusDot.d.ts +18 -0
- package/dist/components/StatusDot/StatusDot.stories.d.ts +24 -0
- package/dist/components/StepDots/StepDots.d.ts +15 -0
- package/dist/components/StepDots/StepDots.stories.d.ts +15 -0
- package/dist/components/SwatchGroup/SwatchGroup.d.ts +20 -0
- package/dist/components/SwatchGroup/SwatchGroup.stories.d.ts +33 -0
- package/dist/components/Switch/Switch.d.ts +10 -0
- package/dist/components/Switch/Switch.stories.d.ts +17 -0
- package/dist/components/TabStrip/TabStrip.d.ts +44 -0
- package/dist/components/TabStrip/TabStrip.stories.d.ts +66 -0
- package/dist/components/Tabs/Tabs.d.ts +28 -0
- package/dist/components/Tabs/Tabs.stories.d.ts +34 -0
- package/dist/components/Tag/Tag.d.ts +12 -0
- package/dist/components/Tag/Tag.stories.d.ts +21 -0
- package/dist/components/Textarea/Textarea.d.ts +15 -0
- package/dist/components/Textarea/Textarea.stories.d.ts +19 -0
- package/dist/components/ThemeEditor/ThemeEditor.d.ts +56 -0
- package/dist/components/ThemePreview/ThemePreview.d.ts +15 -0
- package/dist/components/ThemeSwitch/ThemeSwitch.d.ts +30 -0
- package/dist/components/ThemeSwitch/ThemeSwitch.stories.d.ts +15 -0
- package/dist/components/TimeField/TimeField.d.ts +32 -0
- package/dist/components/TimeField/TimeField.stories.d.ts +36 -0
- package/dist/components/TimeField/time-text.d.ts +26 -0
- package/dist/components/TimeSeriesChart/TimeSeriesChart.d.ts +30 -0
- package/dist/components/TimeSeriesChart/TimeSeriesChart.stories.d.ts +29 -0
- package/dist/components/Toast/Toast.d.ts +18 -0
- package/dist/components/Toast/Toast.stories.d.ts +15 -0
- package/dist/components/Toast/Toaster.d.ts +18 -0
- package/dist/components/Toast/Toaster.stories.d.ts +16 -0
- package/dist/components/Toast/toast-region.d.ts +17 -0
- package/dist/components/Toast/toast-store.d.ts +46 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +16 -0
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +20 -0
- package/dist/components/Toolbar/Toolbar.d.ts +21 -0
- package/dist/components/Toolbar/Toolbar.stories.d.ts +25 -0
- package/dist/components/Tooltip/Tooltip.d.ts +13 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +23 -0
- package/dist/components/TreeView/TreeView.d.ts +42 -0
- package/dist/components/TreeView/TreeView.stories.d.ts +26 -0
- package/dist/components/TreeView/pathRows.d.ts +16 -0
- package/dist/components/TreeView/treeKeys.d.ts +16 -0
- package/dist/components/UsageMeterRow/UsageMeterRow.d.ts +28 -0
- package/dist/components/UsageMeterRow/UsageMeterRow.stories.d.ts +26 -0
- package/dist/components/WorktreeRow/WorktreeRow.d.ts +32 -0
- package/dist/components/WorktreeRow/WorktreeRow.stories.d.ts +32 -0
- package/dist/components/ZoomBar/ZoomBar.d.ts +22 -0
- package/dist/components/ZoomBar/ZoomBar.stories.d.ts +17 -0
- package/dist/editor/RichTextEditor/EditorToolbar.d.ts +35 -0
- package/dist/editor/RichTextEditor/ImageBar.d.ts +17 -0
- package/dist/editor/RichTextEditor/LinkForm.d.ts +16 -0
- package/dist/editor/RichTextEditor/RichTextEditor.d.ts +45 -0
- package/dist/editor/RichTextEditor/RichTextEditor.stories.d.ts +43 -0
- package/dist/editor/RichTextEditor/extensions.d.ts +23 -0
- package/dist/editor/RichTextEditor/icons.d.ts +23 -0
- package/dist/editor/RichTextEditor/insertImage.d.ts +28 -0
- package/dist/editor/RichTextEditor/labels.d.ts +32 -0
- package/dist/editor/index.d.ts +4 -0
- package/dist/editor.js +629 -0
- package/dist/editor.js.map +1 -0
- package/dist/fonts.css +2 -0
- package/dist/icons.d.ts +891 -0
- package/dist/image/ImageCropper/ImageCropper.d.ts +39 -0
- package/dist/image/ImageCropper/ImageCropper.stories.d.ts +18 -0
- package/dist/image/ImageField/ImageField.d.ts +86 -0
- package/dist/image/ImageField/ImageField.stories.d.ts +29 -0
- package/dist/image/crop.d.ts +39 -0
- package/dist/image/index.d.ts +3 -0
- package/dist/image.js +377 -0
- package/dist/image.js.map +1 -0
- package/dist/index.d.ts +138 -0
- package/dist/index.js +8253 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/cx.d.ts +2 -0
- package/dist/internal/date.d.ts +96 -0
- package/dist/internal/duration.d.ts +4 -0
- package/dist/internal/focus.d.ts +34 -0
- package/dist/internal/keys.d.ts +21 -0
- package/dist/internal/modal.d.ts +8 -0
- package/dist/internal/portal.d.ts +9 -0
- package/dist/internal/position.d.ts +37 -0
- package/dist/internal/reveal.d.ts +6 -0
- package/dist/internal/roving.d.ts +25 -0
- package/dist/internal/scroll-fade.d.ts +16 -0
- package/dist/internal/session-labels.d.ts +3 -0
- package/dist/internal/text.d.ts +2 -0
- package/dist/llms-full.txt +9786 -0
- package/dist/llms.txt +162 -0
- package/dist/mcp.js +24706 -0
- package/dist/panZoom.d.ts +40 -0
- package/dist/styles.css +2 -0
- package/dist/styles.layered.css +4 -0
- package/dist/tailwind.css +38 -0
- package/dist/test-utils.d.ts +5 -0
- package/dist/theme/font.d.ts +20 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/theme.d.ts +62 -0
- package/dist/tokens.css +304 -0
- package/dist/tokens.json +267 -0
- package/dist/types.d.ts +6 -0
- package/package.json +177 -4
- package/skills/xdev-ui-admin/SKILL.md +106 -0
- package/skills/xdev-ui-admin/references/audit-log.md +18 -0
- package/skills/xdev-ui-admin/references/console-chrome.md +119 -0
- package/skills/xdev-ui-admin/references/dashboard.md +24 -0
- package/skills/xdev-ui-admin/references/detail-and-forms.md +22 -0
- package/skills/xdev-ui-admin/references/dialogs.md +33 -0
- package/skills/xdev-ui-admin/references/forms.md +60 -0
- package/skills/xdev-ui-admin/references/from-other-kits.md +75 -0
- package/skills/xdev-ui-admin/references/layout.md +58 -0
- package/skills/xdev-ui-admin/references/navigation.md +10 -0
- package/skills/xdev-ui-admin/references/permissions.md +26 -0
- package/skills/xdev-ui-admin/references/resource-list.md +64 -0
- package/skills/xdev-ui-admin/references/responsive.md +68 -0
- package/skills/xdev-ui-admin/references/rich-content.md +37 -0
- package/skills/xdev-ui-admin/references/settings.md +20 -0
- package/skills/xdev-ui-admin/references/sign-in.md +47 -0
- package/skills/xdev-ui-admin/references/states-feedback.md +26 -0
- package/skills/xdev-ui-admin/references/tree-list.md +50 -0
- package/skills/xdev-ui-admin/references/users-roles.md +32 -0
- package/skills/xdev-ui-admin/references/ux-principles.md +43 -0
- package/skills/xdev-ui-admin/references/visual-identity.md +62 -0
- package/skills/xdev-ui-admin/templates/admin/_gitignore +3 -0
- package/skills/xdev-ui-admin/templates/admin/_mcp.json +5 -0
- package/skills/xdev-ui-admin/templates/admin/_npmrc +2 -0
- package/skills/xdev-ui-admin/templates/admin/index.html +14 -0
- package/skills/xdev-ui-admin/templates/admin/package.json +24 -0
- package/skills/xdev-ui-admin/templates/admin/src/App.tsx +66 -0
- package/skills/xdev-ui-admin/templates/admin/src/app.css +26 -0
- package/skills/xdev-ui-admin/templates/admin/src/auth/permissions.ts +7 -0
- package/skills/xdev-ui-admin/templates/admin/src/auth/session.ts +42 -0
- package/skills/xdev-ui-admin/templates/admin/src/data/context.ts +11 -0
- package/skills/xdev-ui-admin/templates/admin/src/data/store.ts +84 -0
- package/skills/xdev-ui-admin/templates/admin/src/data/useLoad.ts +25 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/en.ts +98 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/index.tsx +63 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/vi.ts +98 -0
- package/skills/xdev-ui-admin/templates/admin/src/i18n/xdev-ui-labels.ts +47 -0
- package/skills/xdev-ui-admin/templates/admin/src/main.tsx +12 -0
- package/skills/xdev-ui-admin/templates/admin/src/notify.tsx +36 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/Dashboard.tsx +55 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/ItemDetail.tsx +83 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/ItemsList.tsx +140 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/NotFound.tsx +17 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/Settings.tsx +37 -0
- package/skills/xdev-ui-admin/templates/admin/src/pages/SignIn.tsx +105 -0
- package/skills/xdev-ui-admin/templates/admin/src/router.ts +49 -0
- package/skills/xdev-ui-admin/templates/admin/src/shell/AccountMenu.tsx +36 -0
- package/skills/xdev-ui-admin/templates/admin/src/shell/Shell.tsx +53 -0
- package/skills/xdev-ui-admin/templates/admin/src/theme.ts +34 -0
- package/skills/xdev-ui-admin/templates/admin/tsconfig.json +16 -0
- package/skills/xdev-ui-admin/templates/admin/vite.config.ts +4 -0
- package/skills/xdev-ui-build-app/SKILL.md +85 -0
- package/skills/xdev-ui-build-app/references/app-shell.md +20 -0
- package/skills/xdev-ui-build-app/references/i18n.md +9 -0
- package/skills/xdev-ui-build-app/references/responsive-a11y.md +10 -0
- package/skills/xdev-ui-build-app/references/routing.md +14 -0
- package/skills/xdev-ui-build-app/references/setup.md +25 -0
- package/skills/xdev-ui-build-app/references/states.md +25 -0
- package/skills/xdev-ui-build-app/references/theme.md +11 -0
- package/skills/xdev-ui-build-app/templates/app/_gitignore +3 -0
- package/skills/xdev-ui-build-app/templates/app/_mcp.json +5 -0
- package/skills/xdev-ui-build-app/templates/app/_npmrc +2 -0
- package/skills/xdev-ui-build-app/templates/app/index.html +14 -0
- package/skills/xdev-ui-build-app/templates/app/package.json +24 -0
- package/skills/xdev-ui-build-app/templates/app/src/App.tsx +77 -0
- package/skills/xdev-ui-build-app/templates/app/src/app.css +3 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/en.ts +35 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/index.tsx +63 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/vi.ts +35 -0
- package/skills/xdev-ui-build-app/templates/app/src/i18n/xdev-ui-labels.ts +19 -0
- package/skills/xdev-ui-build-app/templates/app/src/main.tsx +12 -0
- package/skills/xdev-ui-build-app/templates/app/src/notify.tsx +36 -0
- package/skills/xdev-ui-build-app/templates/app/src/pages/Home.tsx +22 -0
- package/skills/xdev-ui-build-app/templates/app/src/pages/NotFound.tsx +17 -0
- package/skills/xdev-ui-build-app/templates/app/src/pages/Settings.tsx +35 -0
- package/skills/xdev-ui-build-app/templates/app/src/router.ts +26 -0
- package/skills/xdev-ui-build-app/templates/app/src/theme.ts +34 -0
- package/skills/xdev-ui-build-app/templates/app/tsconfig.json +16 -0
- package/skills/xdev-ui-build-app/templates/app/vite.config.ts +4 -0
- package/skills/xdev-ui-design/SKILL.md +111 -0
- package/skills/xdev-ui-design/references/brand.md +58 -0
- package/skills/xdev-ui-design/references/checklist.md +55 -0
- package/skills/xdev-ui-design/references/owner-notes.md +54 -0
- package/skills/xdev-ui-design/references/porting.md +56 -0
- package/skills/xdev-ui-design/references/rules.md +135 -0
- package/skills/xdev-ui-design/references/screens.md +61 -0
- package/skills/xdev-ui-design/references/tokens.md +97 -0
- package/skills/xdev-ui-improve/SKILL.md +96 -0
- package/skills/xdev-ui-improve/references/plan-template.md +59 -0
- package/skills/xdev-ui-motion/SKILL.md +87 -0
- package/skills/xdev-ui-motion/references/recipes.md +117 -0
- package/skills/xdev-ui-review/SKILL.md +141 -0
- package/skills/xdev-ui-review/references/checklist.md +92 -0
- package/skills/xdev-ui-review/references/grep-recipes.md +37 -0
- package/skills/xdev-ui-review/references/pages/dashboard.md +21 -0
- package/skills/xdev-ui-review/references/pages/dialogs-forms.md +23 -0
- package/skills/xdev-ui-review/references/pages/list.md +22 -0
- package/skills/xdev-ui-review/references/pages/provider-grid.md +19 -0
- package/skills/xdev-ui-review/references/pages/settings.md +18 -0
- package/skills/xdev-ui-review/references/pages/sign-in.md +21 -0
- package/skills/xdev-ui-review/references/web-interface.md +73 -0
- package/skills/xdev-ui-review/scripts/audit.mjs +775 -0
- package/skills/xdev-ui-ux-standards/SKILL.md +88 -0
- package/skills/xdev-ui-ux-standards/references/heuristics-checklist.md +129 -0
- package/skills/xdev-ui-ux-standards/references/patterns.md +120 -0
- package/skills/xdev-ui-ux-standards/references/platforms.md +104 -0
- package/skills/xdev-ui-ux-standards/references/standards-map.md +144 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: xdev-ui-ux-standards
|
|
3
|
+
description: "Applies WCAG 2.2 AA, the WAI-ARIA Authoring Practices patterns, the macOS, Windows and GNOME interface guidelines, the ten usability heuristics and the VS Code UX guidelines to desktop UI built with @xdev-asia/ui: a keyboard and ARIA contract per component, focus, contrast, target size, motion, forced colours, status messages and one cross-platform decision where the platforms disagree. Use when designing a screen or component, before building one, or for a standards review after the xdev-ui-review audit."
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# UX and accessibility standards for @xdev-asia/ui
|
|
8
|
+
|
|
9
|
+
The bar is WCAG 2.2 level AA, the APG pattern for every widget, and one decision per platform conflict. Each rule in the references names the page it came from. Anything not confirmed on a fetched page is marked [Unverified].
|
|
10
|
+
|
|
11
|
+
## When to use
|
|
12
|
+
|
|
13
|
+
- **Design**: before you draw a new screen, dialog or widget.
|
|
14
|
+
- **Build**: while you wire keyboard, ARIA, focus, motion and status messages.
|
|
15
|
+
- **Review**: after `node <review-skill-dir>/scripts/audit.mjs` passes, for what a script cannot see.
|
|
16
|
+
|
|
17
|
+
Skip it for layout, tokens and page patterns (use `xdev-ui-admin`) and for the pre-delivery pass itself (use `xdev-ui-review`). This skill answers which rule applies and where it comes from.
|
|
18
|
+
|
|
19
|
+
## How it fits with the other skills
|
|
20
|
+
|
|
21
|
+
| skill | answers |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `xdev-ui-build-app` | how to set up and build the app: shell, theme, i18n, states |
|
|
24
|
+
| `xdev-ui-admin` | which page pattern, container and states an admin screen needs |
|
|
25
|
+
| `xdev-ui-ux-standards` | what the result must satisfy, with the source for each rule |
|
|
26
|
+
| `xdev-ui-review` | how to check it: `audit.mjs`, the fix order and the pre-delivery checklist, the only one |
|
|
27
|
+
|
|
28
|
+
The review audit rules `focus-outline`, `forced-colors`, `positive-tabindex`, `icon-button-name`, `target-size`, `reduced-motion`, `paste-block` and `contrast` are the automated part of this skill. Their rule IDs are in [standards map](references/standards-map.md).
|
|
29
|
+
|
|
30
|
+
## 1. Design
|
|
31
|
+
|
|
32
|
+
1. Pick the APG pattern for every interactive part from [patterns](references/patterns.md). If no pattern fits, use a native element (`button`, `input`, `select`, `a`) instead of a custom role.
|
|
33
|
+
2. Take the platform decisions from [platforms](references/platforms.md): dialog button order, capitalization, shortcuts, window controls.
|
|
34
|
+
3. Name the four states of each region: empty, loading, error and done. Check them against heuristics 1, 3, 5 and 9 in [heuristics checklist](references/heuristics-checklist.md).
|
|
35
|
+
4. Use colour tokens only. Text tokens on their grounds pass 4.5:1. The known exceptions (`--line`, `--x-color-line`) are decorative hairlines listed in the standards map. Do not use them as the only boundary of a control: use `--line-strong` or `--x-color-line-strong`.
|
|
36
|
+
|
|
37
|
+
## 2. Build
|
|
38
|
+
|
|
39
|
+
- Every action works with Tab, Shift+Tab, Enter and Space. No `tabIndex` above 0.
|
|
40
|
+
- A composite widget (menu, tabs, listbox, tree, toolbar, grid) is one Tab stop. Arrow keys move inside it, by roving `tabIndex` or `aria-activedescendant`.
|
|
41
|
+
- Esc closes the topmost layer and focus returns to the control that opened it. Focus never drops to `body`.
|
|
42
|
+
- The focus ring stays visible. Remove the outline only where a `:focus-visible` rule draws a replacement. Prefer `outline`: forced colours drop `box-shadow`.
|
|
43
|
+
- An icon-only control is `IconButton` with a `label`, or `Icon` with a `label` inside a named button.
|
|
44
|
+
- A status message (saved, 18 results, copied) is in a `role="status"` region that exists before the text changes. Errors that need attention use `role="alert"`, sparingly.
|
|
45
|
+
- A pointer target is at least 24 by 24 CSS px, or it has 24px of clear space around it.
|
|
46
|
+
- Animation that moves, scales or rotates stops under `prefers-reduced-motion: reduce`.
|
|
47
|
+
- A ring, border or state drawn with `box-shadow` or a background image gets a `forced-colors: active` fix with system colours.
|
|
48
|
+
|
|
49
|
+
```css
|
|
50
|
+
.thing:focus-visible {
|
|
51
|
+
outline: 0.125rem solid var(--x-color-focus);
|
|
52
|
+
outline-offset: 0.125rem;
|
|
53
|
+
}
|
|
54
|
+
@media (forced-colors: active) {
|
|
55
|
+
.field:focus-visible { outline: 0.125rem solid Highlight; }
|
|
56
|
+
}
|
|
57
|
+
@media (prefers-reduced-motion: reduce) {
|
|
58
|
+
.panel { animation: none; transition: none; }
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## 3. Review
|
|
63
|
+
|
|
64
|
+
1. Run the review audit with the contrast pass:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
node <review-skill-dir>/scripts/audit.mjs src --contrast
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
2. For each component on the screen, test its row in [patterns](references/patterns.md) with the keyboard only.
|
|
71
|
+
3. Walk the [heuristics checklist](references/heuristics-checklist.md) in the running app, in dark and light, at 320px wide, with reduced motion on and, on Windows, a contrast theme on.
|
|
72
|
+
4. Report each finding with its rule ID from the standards map, its file and line, and the fix. Say which checks you did not run.
|
|
73
|
+
|
|
74
|
+
## Known gaps in the library
|
|
75
|
+
|
|
76
|
+
These are listed so a review does not blame the app for them. Fix them in `@xdev-asia/ui`, not in the app. Checked against the source on 2026-11-24; re-check a gap in the component before you report it.
|
|
77
|
+
|
|
78
|
+
- `TabStrip`: each close button sits inside the tablist next to its tab (it is out of the Tab order; Delete closes the selected tab).
|
|
79
|
+
- Forced colours: only the focus rings of `SearchInput`, `CommandPalette`, `TabStrip`, `SplitHandle` and the scroll fade of `Segmented` and `Tabs` ship a `forced-colors` rule. Selection and state drawn with a background elsewhere is untested in a contrast theme.
|
|
80
|
+
|
|
81
|
+
`Menu` (arrows, Home, End, typeahead), `CommandPalette` (`combobox` with `aria-activedescendant`), `Toolbar` and `ZoomBar` (one Tab stop, arrow keys) and `Dialog` with `alert` (`aria-describedby` on the body) are no longer gaps.
|
|
82
|
+
|
|
83
|
+
## References
|
|
84
|
+
|
|
85
|
+
- [Standards map](references/standards-map.md): each rule, its source URL, how it applies and its check.
|
|
86
|
+
- [Patterns](references/patterns.md): keyboard and ARIA contract for every component.
|
|
87
|
+
- [Platforms](references/platforms.md): macOS, Windows and Linux differences and the xDev decision.
|
|
88
|
+
- [Heuristics checklist](references/heuristics-checklist.md): the reviewer's list.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Heuristics checklist
|
|
2
|
+
|
|
3
|
+
The reviewer's list for one screen or flow, in the running app. Each heuristic from https://www.nngroup.com/articles/ten-usability-heuristics/ becomes checks you can answer yes or no. Rule IDs point to the standards map. Mark each item pass, fail or not run; never mark an item you did not run.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
- Setup
|
|
7
|
+
- 1. Visibility of system status
|
|
8
|
+
- 2. Match with the real world
|
|
9
|
+
- 3. User control and freedom
|
|
10
|
+
- 4. Consistency and standards
|
|
11
|
+
- 5. Error prevention
|
|
12
|
+
- 6. Recognition rather than recall
|
|
13
|
+
- 7. Flexibility and efficiency
|
|
14
|
+
- 8. Aesthetic and minimalist design
|
|
15
|
+
- 9. Recognize, diagnose and recover from errors
|
|
16
|
+
- 10. Help and documentation
|
|
17
|
+
- Accessibility pass
|
|
18
|
+
|
|
19
|
+
## Setup
|
|
20
|
+
|
|
21
|
+
- Run `xdev-ui-review` first; its errors are fixed.
|
|
22
|
+
- Test in dark and light, in `en` and `vi`, at full width and at 320px wide.
|
|
23
|
+
- Have a keyboard, a pointer, and on one platform a screen reader (VoiceOver, Narrator or Orca).
|
|
24
|
+
|
|
25
|
+
## 1. Visibility of system status
|
|
26
|
+
|
|
27
|
+
"The design should always keep users informed about what is going on, through appropriate feedback."
|
|
28
|
+
|
|
29
|
+
- [ ] Every action the user starts shows a result within the region it changed (row updated, toast, status bar).
|
|
30
|
+
- [ ] Background work shows a status bar item with progress; a notification only when attention is needed, with Cancel (V2).
|
|
31
|
+
- [ ] Loading, empty, error and done are designed for every region (one `Spinner` per region).
|
|
32
|
+
- [ ] The current view, tab, branch and pane are marked (`aria-current` or `aria-selected`), not by colour alone (C5).
|
|
33
|
+
- [ ] Status text reaches screen readers through a live region (N3, N4).
|
|
34
|
+
|
|
35
|
+
## 2. Match with the real world
|
|
36
|
+
|
|
37
|
+
"The design should speak the users' language."
|
|
38
|
+
|
|
39
|
+
- [ ] Labels use the words of the domain (branch, commit, worktree, session), not internal names or error codes.
|
|
40
|
+
- [ ] Icons are clear metaphors; an icon without a common meaning has a text label (V4, V6).
|
|
41
|
+
- [ ] Dates and numbers use the active locale.
|
|
42
|
+
|
|
43
|
+
## 3. User control and freedom
|
|
44
|
+
|
|
45
|
+
Users "need a clearly marked emergency exit".
|
|
46
|
+
|
|
47
|
+
- [ ] Esc closes every overlay and returns focus to its trigger (K7).
|
|
48
|
+
- [ ] Destructive actions can be undone or are confirmed first (E4).
|
|
49
|
+
- [ ] Long jobs can be cancelled.
|
|
50
|
+
- [ ] Focus can leave every terminal and editor pane with F6 (K2).
|
|
51
|
+
|
|
52
|
+
## 4. Consistency and standards
|
|
53
|
+
|
|
54
|
+
"Users should not have to wonder whether different words, situations, or actions mean the same thing."
|
|
55
|
+
|
|
56
|
+
- [ ] One name and one icon per action across the app (B4).
|
|
57
|
+
- [ ] Navigation keeps its order across views (B3).
|
|
58
|
+
- [ ] Dialogs put Cancel first and the primary last; one primary per surface (platforms).
|
|
59
|
+
- [ ] Sentence case in every label; no emoji; no exclamation marks.
|
|
60
|
+
- [ ] Standard shortcuts keep their platform meaning; no shortcut is overridden (K8, V5).
|
|
61
|
+
- [ ] Each widget follows its APG pattern from the patterns file.
|
|
62
|
+
|
|
63
|
+
## 5. Error prevention
|
|
64
|
+
|
|
65
|
+
"The best designs carefully prevent problems from occurring in the first place."
|
|
66
|
+
|
|
67
|
+
- [ ] Inputs constrain values (select, picker, numeric field) where possible.
|
|
68
|
+
- [ ] Save stays disabled until something changed; the reason for a disabled control is written next to it.
|
|
69
|
+
- [ ] Destructive confirms name the object and repeat the verb; nothing destructive is the Enter default.
|
|
70
|
+
- [ ] Changing a setting does not move focus or open a window without warning (B2).
|
|
71
|
+
|
|
72
|
+
## 6. Recognition rather than recall
|
|
73
|
+
|
|
74
|
+
"Minimize the user's memory load by making elements, actions, and options visible."
|
|
75
|
+
|
|
76
|
+
- [ ] Every shortcut is shown in its menu item, tooltip or command palette row.
|
|
77
|
+
- [ ] Pickers show recent and current values; a pick list offers "Create new" when it applies (V6).
|
|
78
|
+
- [ ] Multi-step flows carry earlier values forward (E5).
|
|
79
|
+
|
|
80
|
+
## 7. Flexibility and efficiency
|
|
81
|
+
|
|
82
|
+
"Shortcuts, hidden from novice users, may speed up the interaction for the expert user."
|
|
83
|
+
|
|
84
|
+
- [ ] Frequent actions have a shortcut and a command palette entry; the palette groups commands by category (V5).
|
|
85
|
+
- [ ] Lists support typeahead where the pattern asks for it (listbox over 7 options, tree).
|
|
86
|
+
- [ ] Every pointer gesture (drag to resize, reorder, pan) has a keyboard path (K1).
|
|
87
|
+
|
|
88
|
+
## 8. Aesthetic and minimalist design
|
|
89
|
+
|
|
90
|
+
"Interfaces should not contain information that is irrelevant or rarely needed."
|
|
91
|
+
|
|
92
|
+
- [ ] One accent marks the current thing; state is a tint, a 1px border or a `StatusDot`.
|
|
93
|
+
- [ ] A view has few actions per row (three at most) and few views per sidebar (V7).
|
|
94
|
+
- [ ] Empty states are short, with one action and specific link text (V8).
|
|
95
|
+
- [ ] No notification for promotion or for messages that need no action (V1, V3).
|
|
96
|
+
|
|
97
|
+
## 9. Recognize, diagnose and recover from errors
|
|
98
|
+
|
|
99
|
+
"Error messages should be expressed in plain language (no error codes), precisely indicate the problem."
|
|
100
|
+
|
|
101
|
+
- [ ] Field errors name the field and say what is wrong in text (E1).
|
|
102
|
+
- [ ] When the fix is known, the message suggests it (E3).
|
|
103
|
+
- [ ] A failed load shows a `Banner` with a retry action; the user's input is kept.
|
|
104
|
+
- [ ] Technical detail (exit code, log) is one step away, not the headline.
|
|
105
|
+
|
|
106
|
+
## 10. Help and documentation
|
|
107
|
+
|
|
108
|
+
"It's best if the system doesn't need any additional explanation."
|
|
109
|
+
|
|
110
|
+
- [ ] Complicated settings link to their documentation (V10).
|
|
111
|
+
- [ ] Help and About keep one place in the menu (B5).
|
|
112
|
+
- [ ] The keyboard shortcut list is reachable from the menu and the palette.
|
|
113
|
+
|
|
114
|
+
## Accessibility pass
|
|
115
|
+
|
|
116
|
+
- [ ] Tab through the screen: order follows reading order, no positive `tabIndex`, focus ring visible on every stop (K3, K4).
|
|
117
|
+
- [ ] The focused control is never fully covered by a sticky header, the status bar or a toast (K5).
|
|
118
|
+
- [ ] Every control has a name; icon-only controls use `IconButton` `label` (N1, N2).
|
|
119
|
+
- [ ] An `Icon` beside visible text has no `label`, so a screen reader does not say it twice; an icon that carries meaning alone has one (N2).
|
|
120
|
+
- [ ] Every toggle, tab, disclosure and selectable row exposes its pressed, selected or expanded state, and the state stays in sync (N1).
|
|
121
|
+
- [ ] A submit that fails with several errors names each field in text and moves focus to the first error or a summary that links to each (E1, K7).
|
|
122
|
+
- [ ] Sign-in fields accept paste and password managers; a code field does not block paste (E6).
|
|
123
|
+
- [ ] Nothing advances or rotates by itself (carousel, ticker, rotating tip) unless it pauses on hover and focus and has a pause control. [Unverified] maps to WCAG 2.2.2, not yet in the standards map.
|
|
124
|
+
- [ ] Pointer targets are 24px or have 24px of clear space; check tab close, search clear and swatches (P1).
|
|
125
|
+
- [ ] Text spacing override (1.5, 2, 0.12, 0.16) clips nothing (L1).
|
|
126
|
+
- [ ] Turn on reduced motion: nothing slides, scales or spins except progress (M1, M2).
|
|
127
|
+
- [ ] On Windows, turn on a contrast theme: focus rings, selected rows, field edges and icons stay visible (M5, M6).
|
|
128
|
+
- [ ] Tooltips and popovers close on Esc and stay while hovered (L3).
|
|
129
|
+
- [ ] Toasts that hide by themselves repeat information available elsewhere (B6).
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Keyboard and ARIA contract per component
|
|
2
|
+
|
|
3
|
+
Each component in `src/components` maps to an APG pattern, a native element, or "static" (no interaction). The contract is what a keyboard and screen reader user must get. "Gap" marks where the component does not meet its pattern yet; fix it in the library.
|
|
4
|
+
|
|
5
|
+
Pattern pages are under https://www.w3.org/WAI/ARIA/apg/patterns/ followed by the slug in the table. Keyboard practice: https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/. Names: https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
- Shared rules
|
|
9
|
+
- Pattern contracts
|
|
10
|
+
- Overlays
|
|
11
|
+
- Navigation
|
|
12
|
+
- Inputs
|
|
13
|
+
- Actions
|
|
14
|
+
- Status and feedback
|
|
15
|
+
- Display and static parts
|
|
16
|
+
|
|
17
|
+
## Shared rules
|
|
18
|
+
|
|
19
|
+
- No ARIA is better than bad ARIA: a role promises the keyboard behaviour of that pattern (APG read me first, https://www.w3.org/WAI/ARIA/apg/practices/read-me-first/).
|
|
20
|
+
- A composite widget is one Tab stop. Roving `tabindex`: the active item has `0`, the rest `-1`, and arrow keys move `focus()`. `aria-activedescendant`: focus stays on the container or input, which points at the active item's id; scroll it into view yourself.
|
|
21
|
+
- Disabled items in menus stay focusable by arrows and use `aria-disabled`.
|
|
22
|
+
- Names come from visible text first, then `aria-labelledby`, then `aria-label`. Every `aria-label` is a translated string.
|
|
23
|
+
- Positive `tabindex` is never used (WCAG F44).
|
|
24
|
+
|
|
25
|
+
## Pattern contracts
|
|
26
|
+
|
|
27
|
+
| pattern (slug) | roles and attributes | keys |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Modal dialog (`dialog-modal`) | `dialog`, `aria-modal="true"`, `aria-labelledby` to the title; `aria-describedby` optional | Focus moves in on open; Tab and Shift+Tab wrap; Esc closes; focus returns to the trigger |
|
|
30
|
+
| Alert dialog (`alertdialog`) | `alertdialog`, `aria-modal="true"`, `aria-labelledby` to the title, `aria-describedby` to the message | As modal dialog |
|
|
31
|
+
| Menu and menubar (`menubar`), menu button (`menu-button`) | `menu` with `menuitem`, `menuitemcheckbox`, `menuitemradio`, `separator`; the button has `aria-haspopup="menu"` and `aria-expanded` | Enter, Space or Down opens on the first item, Up on the last; Up and Down move; Home and End; typeahead optional; Enter activates and closes; Space toggles a check item; Esc closes and returns focus to the button; Tab closes |
|
|
32
|
+
| Tabs (`tabs`) | `tablist` (named) owns only `tab` elements; `aria-selected`; `aria-controls` to the `tabpanel`, which has `aria-labelledby` | Tab lands on the active tab; Left and Right move and wrap; Home and End optional; Delete may close the tab and focus the next one; Shift+F10 opens the tab's menu |
|
|
33
|
+
| Listbox (`listbox`) | `listbox` (named unless in a combobox) with `option`; `aria-selected`; named `group` for sections | Up and Down; Home and End for more than 5 options; typeahead for more than 7 |
|
|
34
|
+
| Combobox (`combobox`) | `combobox` on the input with `aria-expanded`, `aria-controls`, `aria-activedescendant`, `aria-autocomplete` | Focus stays in the input; Down enters the list; Enter accepts and closes; Esc closes, then may clear |
|
|
35
|
+
| Tree view (`treeview`) | `tree` (named), `treeitem`, child items in `group`; `aria-expanded` on parents only; `aria-level` | Up and Down; Right opens or moves to the first child; Left closes or moves to the parent; Home and End; Enter runs the default action; typeahead recommended |
|
|
36
|
+
| Grid (`grid`) | `grid`, `row`, `gridcell`, `columnheader`; `aria-sort` on the sorted header | Arrows move one cell; Home, End, Ctrl+Home, Ctrl+End; Enter or F2 enters a cell, Esc leaves it |
|
|
37
|
+
| Radio group (`radio`) | `radiogroup` (named) with `radio` and `aria-checked` | Tab enters on the checked radio; arrows move and check |
|
|
38
|
+
| Toolbar (`toolbar`) | `toolbar` (named); `aria-orientation` when vertical | One Tab stop; Left and Right move; Home and End optional |
|
|
39
|
+
| Tooltip (`tooltip`) | `tooltip`; the trigger has `aria-describedby` | Shows on focus and hover; Esc hides; never takes focus. The pattern is a work in progress without task force consensus [Unverified as final] |
|
|
40
|
+
| Disclosure (`disclosure`) | `button` with `aria-expanded`; `aria-controls` optional | Enter or Space toggles |
|
|
41
|
+
| Switch (`switch`) | `switch` with `aria-checked`, or a native checkbox; the label does not change with the state | Space toggles; Enter optional |
|
|
42
|
+
| Accordion (`accordion`) | header `button` inside a `heading`, with `aria-expanded` and `aria-controls` | Enter or Space; arrow keys not confirmed on the page [Unverified] |
|
|
43
|
+
| Breadcrumb (`breadcrumb`) | `nav` (named) with `aria-current="page"` on the current item | none |
|
|
44
|
+
|
|
45
|
+
## Overlays
|
|
46
|
+
|
|
47
|
+
| component | pattern | contract and status |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| `Dialog` | Modal dialog; Alert dialog with `alert` | Meets the modal contract: focus in, Tab wraps, Esc calls `onCancel`, page behind is inert, focus returns. Gap: with `alert`, no `aria-describedby` points at the message |
|
|
50
|
+
| `CommandPalette` | Combobox with a listbox popup inside a dialog | Gap: the input has no `combobox` role, `aria-expanded`, `aria-controls` or `aria-activedescendant`; no arrow key, Enter or Esc handling; options have no click or keyboard action. The app must wire these today |
|
|
51
|
+
| `Popover` | Non-modal dialog opened by a button | Trigger gets `aria-haspopup="dialog"`, `aria-expanded`, `aria-controls`; panel takes focus; Esc closes; focus returns. Name it with `label` |
|
|
52
|
+
| `Menu` | Menu | Gap: renders `menu` and `menuitem` roles but has no arrow keys, Home, End, typeahead, roving focus or Esc; the opener does not get `aria-haspopup`. Do not use it as a keyboard menu until fixed |
|
|
53
|
+
| `Tooltip` | Tooltip | Meets the contract. The tip is inside the hover anchor, so it stays while the pointer is over it (WCAG 1.4.13) [Inference: not tested with a gap between trigger and tip]. Never put a control inside it; never attach it to a disabled control |
|
|
54
|
+
| `SearchPicker` | Combobox with listbox | Meets the contract: `aria-activedescendant`, Up, Down, Esc, `aria-expanded`, `aria-autocomplete` |
|
|
55
|
+
|
|
56
|
+
## Navigation
|
|
57
|
+
|
|
58
|
+
| component | pattern | contract and status |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| `Tabs` | Tabs | Meets the contract: arrows, Home, End, `aria-controls`, panels labelled |
|
|
61
|
+
| `TabStrip` | Tabs | Gap: no arrow keys, every tab is a Tab stop; close buttons are children of the tablist, which may own only tabs; `aria-selected` is also set on a presentation wrapper. Close button `.ws-tab-close` is under 24px |
|
|
62
|
+
| `TreeView` | Tree view | Meets the contract: arrows, Home, End, `aria-level`, `aria-expanded` |
|
|
63
|
+
| `NavList` | Native links in a named `nav` | `aria-current` on the current link; Tab order is the list order |
|
|
64
|
+
| `ActivityBar` | Native buttons in a named `nav` | `aria-current` on the active view; each button needs a `label` |
|
|
65
|
+
| `Breadcrumb` | Breadcrumb | Meets the contract |
|
|
66
|
+
| `Disclosure` | Disclosure | Meets the contract |
|
|
67
|
+
| `SplitHandle` | Window splitter (`separator` with a value) | Focusable, `aria-valuenow`, arrows, Home and End resize (keyboard equivalent of drag, WCAG 2.1.1) |
|
|
68
|
+
| `Toolbar`, `ZoomBar` | Toolbar | Arrows move. Gap: every control stays in the Tab order instead of one Tab stop |
|
|
69
|
+
| `StatusBar` | Static region | Items that act are buttons; text updates that matter use a `role="status"` child |
|
|
70
|
+
| `Pagination` | Native `nav`, buttons and `select` | Page summary is `aria-live="polite"` |
|
|
71
|
+
| `PageHeader` | Static heading with actions | One primary action |
|
|
72
|
+
| `AppShell` | Landmarks plus a modal drawer | Skip link `.x-skip-link` first; drawer traps Tab, Esc closes, focus returns |
|
|
73
|
+
|
|
74
|
+
## Inputs
|
|
75
|
+
|
|
76
|
+
| component | pattern | contract and status |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| `Field`, `Textarea`, `FontField` | Native input with label | `label` is visible; `error` sets `aria-invalid` and `aria-describedby` |
|
|
79
|
+
| `SearchInput` | Native search input | Clear button named; result count `aria-live="polite"`. Clear button is under 24px |
|
|
80
|
+
| `Select` | Native `select` | Name with `label` |
|
|
81
|
+
| `Checkbox` | Native checkbox | Space toggles |
|
|
82
|
+
| `RadioGroup` | Radio group (native radios) | Native arrow keys; `radiogroup` named |
|
|
83
|
+
| `Switch` | Switch (native checkbox with `role="switch"`) | Label does not change with state |
|
|
84
|
+
| `Segmented`, `ThemeSwitch`, `FilterChip`, `ReactionBar` | Toggle buttons (`aria-pressed`) in a named `group` | Each button is a Tab stop; Space or Enter toggles. A radio group in a toolbar is the stricter pattern [Inference] |
|
|
85
|
+
| `Tag` | Static text with an optional remove button | Removable tag is focusable; Backspace removes; the remove button is out of the Tab order and under 24px |
|
|
86
|
+
| `SettingRow`, `FormSection` | Native label and control | Description linked by `aria-describedby` |
|
|
87
|
+
|
|
88
|
+
## Actions
|
|
89
|
+
|
|
90
|
+
| component | pattern | contract and status |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| `Button` | Native button | One primary per surface; disabled state uses the native attribute |
|
|
93
|
+
| `IconButton` | Native button | `label` is required and becomes the name; `.ws-icon-btn` is the size to keep at 24px or more |
|
|
94
|
+
| `ActionTile`, `Card` (with action), `ListRow`, `EmptyState` action | Native button | Name from visible text |
|
|
95
|
+
| `CodeBlock` | Native button for copy | Copy confirmation is `aria-live` |
|
|
96
|
+
| `PanZoom` | Focusable `group` | `+`, `-` and `0` zoom; drag pan needs a keyboard equivalent (arrows) [Inference: not in `zoomKey`] |
|
|
97
|
+
| `Comment` | Native buttons | Actions named by text |
|
|
98
|
+
|
|
99
|
+
## Status and feedback
|
|
100
|
+
|
|
101
|
+
| component | pattern | contract and status |
|
|
102
|
+
|---|---|---|
|
|
103
|
+
| `Toast` | Live region `role="status"` | Auto-dismiss only for information shown elsewhere (WCAG 2.2.1); close button named |
|
|
104
|
+
| `Banner` | Live region `role="status"` | Errors that block work may use `alert` sparingly |
|
|
105
|
+
| `FieldMessage` | `role="alert"` | Linked to its input by `aria-describedby` |
|
|
106
|
+
| `Spinner` | `role="status"` with a name | One per region |
|
|
107
|
+
| `Meter` | `meter` with `aria-valuenow`, `aria-valuemin`, `aria-valuemax` and a name | Value also shown as text |
|
|
108
|
+
| `StatTile` | Static text; `aria-busy` while loading | Delta direction in text, not colour only |
|
|
109
|
+
| `StatusDot` | Decorative (`aria-hidden`) | Its state must be in nearby text or the parent's name |
|
|
110
|
+
|
|
111
|
+
## Display and static parts
|
|
112
|
+
|
|
113
|
+
| component | contract |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `Icon` | `aria-hidden` unless `label` is set, then `role="img"` with that name |
|
|
116
|
+
| `Avatar`, `AgentChip`, `BrandMark`, `Heatmap`, `FileIcon` | `role="img"` with a name, or hidden when the text next to it names it |
|
|
117
|
+
| `DataTable` | Native `table` with `caption`; sort buttons in headers set `aria-sort`; row selection uses checkboxes. It is a table, not a grid: no arrow keys expected |
|
|
118
|
+
| `DiffStat` | Named with the counts in words |
|
|
119
|
+
| `CommitGraph` | Hidden; the commit list carries the information |
|
|
120
|
+
| `Badge`, `Kbd`, `DescriptionList` | Static |
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# Platforms: macOS, Windows and Linux
|
|
2
|
+
|
|
3
|
+
xDev is one Tauri app on three systems. Where the platform guides agree, follow them. Where they disagree, xDev picks one behaviour for every platform unless the system itself owns the behaviour (window controls, the macOS menu bar). Consistency inside the app wins over matching each platform (heuristic 4, https://www.nngroup.com/articles/ten-usability-heuristics/).
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
- Sources
|
|
7
|
+
- Decisions
|
|
8
|
+
- Dialogs
|
|
9
|
+
- Capitalization and writing
|
|
10
|
+
- Keyboard shortcuts
|
|
11
|
+
- Windows, title bars and menus
|
|
12
|
+
- Focus, contrast and type
|
|
13
|
+
- Not verified
|
|
14
|
+
|
|
15
|
+
## Sources
|
|
16
|
+
|
|
17
|
+
| short name | URL |
|
|
18
|
+
|---|---|
|
|
19
|
+
| Apple alerts | https://developer.apple.com/design/human-interface-guidelines/alerts |
|
|
20
|
+
| Apple menu bar | https://developer.apple.com/design/human-interface-guidelines/the-menu-bar |
|
|
21
|
+
| Apple keyboards | https://developer.apple.com/design/human-interface-guidelines/keyboards |
|
|
22
|
+
| Apple windows | https://developer.apple.com/design/human-interface-guidelines/windows |
|
|
23
|
+
| Apple buttons | https://developer.apple.com/design/human-interface-guidelines/buttons |
|
|
24
|
+
| Apple writing | https://developer.apple.com/design/human-interface-guidelines/writing |
|
|
25
|
+
| Apple sidebars, toolbars, focus | https://developer.apple.com/design/human-interface-guidelines/sidebars, `toolbars`, `focus-and-selection` |
|
|
26
|
+
| MS dialogs | https://learn.microsoft.com/en-us/windows/apps/design/controls/dialogs-and-flyouts/dialogs |
|
|
27
|
+
| MS title bar | https://learn.microsoft.com/en-us/windows/apps/design/basics/titlebar-design |
|
|
28
|
+
| MS focus visuals | https://learn.microsoft.com/en-us/windows/apps/develop/input/guidelines-for-visualfeedback |
|
|
29
|
+
| MS typography | https://learn.microsoft.com/en-us/windows/apps/design/signature-experiences/typography |
|
|
30
|
+
| MS capitalization | https://learn.microsoft.com/en-us/style-guide/capitalization |
|
|
31
|
+
| MS contrast themes | https://learn.microsoft.com/en-us/windows/apps/design/accessibility/high-contrast-themes |
|
|
32
|
+
| MS accelerators | https://learn.microsoft.com/en-us/windows/apps/design/input/keyboard-accelerators |
|
|
33
|
+
| Fluent 2 type | https://fluent2.microsoft.design/typography |
|
|
34
|
+
| GNOME dialogs | https://developer.gnome.org/hig/patterns/feedback/dialogs.html |
|
|
35
|
+
| GNOME header bars | https://developer.gnome.org/hig/patterns/containers/header-bars.html |
|
|
36
|
+
| GNOME menus | https://developer.gnome.org/hig/patterns/controls/menus.html |
|
|
37
|
+
| GNOME keyboard | https://developer.gnome.org/hig/reference/keyboard.html |
|
|
38
|
+
| GNOME writing | https://developer.gnome.org/hig/guidelines/writing-style.html |
|
|
39
|
+
| GNOME type | https://developer.gnome.org/hig/guidelines/typography.html |
|
|
40
|
+
| GNOME utility panes | https://developer.gnome.org/hig/patterns/containers/utility-panes.html |
|
|
41
|
+
|
|
42
|
+
The Apple pages were read through their JSON data endpoints (`/tutorials/data/design/human-interface-guidelines/<topic>.json`).
|
|
43
|
+
|
|
44
|
+
## Decisions
|
|
45
|
+
|
|
46
|
+
| topic | macOS | Windows | GNOME | xDev decision |
|
|
47
|
+
|---|---|---|---|---|
|
|
48
|
+
| Dialog button order | Default button trailing, Cancel leading | Primary leftmost, Close or Cancel rightmost | Cancel first, affirmative after it | Cancel first, primary last, on all three. Windows differs; accepted for one muscle memory across the app |
|
|
49
|
+
| Esc in a dialog | Cancels | Triggers the Close button | Activates Cancel | Esc cancels |
|
|
50
|
+
| Enter in a dialog | Default button; never Cancel or a destructive button | Only if a default button is set | Affirmative, but not if destructive | Enter confirms, except in an `alert` dialog for a destructive action, where nothing is the default |
|
|
51
|
+
| Button label | Verb; "OK" only for purely informational alerts | One or two words | Specific imperative verb rather than OK | Specific verb that repeats the title's verb ("Delete branch") |
|
|
52
|
+
| Capitalization | Title-style for buttons and menu titles | Sentence case for all UI text | Header case for buttons, menus, tooltips; sentence case for check boxes and labels | Sentence case everywhere. macOS and GNOME title styles are accepted divergences |
|
|
53
|
+
| Ellipsis | When more input is needed | not stated | When more input is needed, not on Preferences | "…" on a command that opens a dialog asking for input |
|
|
54
|
+
| Settings | Cmd+, | not in the accelerator table | Ctrl+, | Cmd+, and Ctrl+, |
|
|
55
|
+
| Quit | Cmd+Q | not in the accelerator table | Ctrl+Q | Cmd+Q and Ctrl+Q |
|
|
56
|
+
| Close | Cmd+W closes the window | Ctrl+W | Ctrl+W | Cmd+W and Ctrl+W close the active tab; a window closes when its last tab closes [Inference] |
|
|
57
|
+
| Next pane | not stated | F6 | not stated | F6 moves focus to the next pane; also the exit key from a terminal pane (WCAG 2.1.2) |
|
|
58
|
+
| Window controls | System frame; avoid custom frames and controls | Caption buttons on the right, always visible | Header bar keeps blank space to drag | Native decorations on every platform. Custom title bar areas stay draggable and never cover the controls |
|
|
59
|
+
| Modifier order in shortcut labels | Control, Option, Shift, Command | not stated | not stated | `Kbd` lists modifiers in Apple order on macOS; Ctrl, Alt, Shift elsewhere [Inference] |
|
|
60
|
+
| Fonts | San Francisco (per Fluent 2's macOS ramp) | Segoe UI Variable | Adwaita Sans | System UI font stack through the `--type-*` tokens; no bundled UI font |
|
|
61
|
+
|
|
62
|
+
## Dialogs
|
|
63
|
+
|
|
64
|
+
- macOS: "Always place the default button on the trailing side of a row." "Cancel buttons are typically on the leading side." Do not make Cancel the default. Destructive style marks an action people did not choose on purpose. "Avoid using OK as the default button title unless the alert is purely informational." (Apple alerts)
|
|
65
|
+
- Windows: "The 'do it' action button(s) should appear as the leftmost buttons. The safe, nondestructive action should appear as the rightmost button." No default button unless one is set; Esc triggers the Close button. (MS dialogs)
|
|
66
|
+
- GNOME: "Always ensure that the cancel button appears first, before the affirmative button." Return activates the affirmative button, but not for an irreversible or destructive action. Esc activates Cancel. (GNOME dialogs)
|
|
67
|
+
- In xDev: `Dialog` puts Cancel first and the primary last in `.dialog-actions`. Destructive confirms use `alert` and `modal`.
|
|
68
|
+
|
|
69
|
+
## Capitalization and writing
|
|
70
|
+
|
|
71
|
+
- macOS buttons use title-style capitalization and start with a verb; menu titles of several words use title style. "Choose a style for each UI element type and use it consistently." (Apple buttons, menu bar, writing)
|
|
72
|
+
- Windows: "Use sentence casing for all UI text, including titles." (MS typography; MS capitalization)
|
|
73
|
+
- GNOME: header capitalization for headings, buttons, switches, menu items and tooltips; sentence capitalization for check boxes, radio buttons, field labels and body text. (GNOME writing)
|
|
74
|
+
- In xDev: sentence case for every string in `en` and `vi`, no emoji, no exclamation marks. The review audit `label-voice` warns on Title Case.
|
|
75
|
+
|
|
76
|
+
## Keyboard shortcuts
|
|
77
|
+
|
|
78
|
+
- Apple: Cmd+, opens settings, Cmd+W closes the active window, Cmd+Q quits, Cmd+N opens a new document. "Don't repurpose standard keyboard shortcuts." (Apple keyboards)
|
|
79
|
+
- Windows accelerator table: Ctrl+W close, Ctrl+S, Ctrl+N, Ctrl+F, F2 rename, F5 or Ctrl+R refresh, F6 next pane, Ctrl+Y redo. Show accelerators in the menu label or tooltip. Ctrl+, and Ctrl+Q are not in the table. (MS accelerators)
|
|
80
|
+
- GNOME: Ctrl+Q quit, Ctrl+W close, Ctrl+, preferences, F10 primary menu, Ctrl+? shortcuts, F1 help, F9 toggles a utility pane. (GNOME keyboard; GNOME utility panes)
|
|
81
|
+
- APG: avoid modifier plus Tab, Enter, Space or Esc; Meta plus a single key; Alt plus a function key; screen reader keys. Context menu is Shift+F10. Redo is Ctrl+Y on Windows and Linux, Cmd+Shift+Z on macOS. (https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/)
|
|
82
|
+
- In xDev: the primary modifier is Cmd on macOS and Ctrl elsewhere. Every shortcut also has a command palette entry. A terminal pane passes keys to the shell except the app's reserved keys (F6 and the palette chord).
|
|
83
|
+
|
|
84
|
+
## Windows, title bars and menus
|
|
85
|
+
|
|
86
|
+
- macOS: "Avoid making custom window frames or controls." Menu order is the app menu, File, Edit, Format, View, app menus, Window, Help; the app menu has About, Settings…, Hide and Quit. "Make every toolbar item available as a command in the menu bar." Sidebars show at most two levels and are not hidden by default. (Apple windows, menu bar, toolbars, sidebars)
|
|
87
|
+
- Windows: title bar 32px (48px with a search box); caption controls anchored right and always visible; all empty title bar space draggable; double-click toggles maximize. (MS title bar)
|
|
88
|
+
- GNOME: main actions at the start of the header bar, the title in the centre, menus at the end; keep blank space to drag. The primary menu ends with Preferences, Keyboard Shortcuts, Help and About, and holds no Close or Quit. (GNOME header bars, menus)
|
|
89
|
+
- In xDev: native decorations; on macOS a native menu bar with the standard order; on Windows and Linux the same commands in the app menu and the command palette.
|
|
90
|
+
|
|
91
|
+
## Focus, contrast and type
|
|
92
|
+
|
|
93
|
+
- macOS: focus ring for text and search fields, highlight for list and collection selection; Tab moves among focus groups. (Apple focus and selection)
|
|
94
|
+
- Windows focus visual: 2px primary border, 1px secondary border, 1px margin. (MS focus visuals) In xDev the ring is `--x-color-focus`, which passes 3:1 on every ground.
|
|
95
|
+
- Windows contrast themes: "Do not hard-code colors" in high contrast; use system colour pairs; 2px borders on flyouts and dialogs; GrayText only for disabled content. (MS contrast themes) In CSS this is `forced-colors: active` with system colours (see the standards map, M5 and M6).
|
|
96
|
+
- Type: Windows minimum 12px regular or 14px semibold, semibold instead of bold, sentence case; GNOME: do not hard-code font sizes, avoid italic, use real Unicode punctuation. (MS typography; GNOME type) In xDev all sizes come from `--type-*` tokens.
|
|
97
|
+
|
|
98
|
+
## Not verified
|
|
99
|
+
|
|
100
|
+
- [Unverified] Where macOS places the window controls: the Apple windows page only says the frame "can include window controls".
|
|
101
|
+
- [Unverified] Where GNOME places the close button: the header bars page does not say.
|
|
102
|
+
- [Unverified] The Fluent 2 dialog page does not state button order.
|
|
103
|
+
- [Unverified] Whether Ctrl+, and Ctrl+Q have a Windows convention outside the accelerator table.
|
|
104
|
+
- [Unverified] Windows guidance to hide focus rectangles for mouse input came from a search snippet, not a fetched page.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Standards map
|
|
2
|
+
|
|
3
|
+
One row per rule: the source, what it means in xDev, and the pass or fail check. "audit" means a rule of `xdev-ui-review/scripts/audit.mjs`. Quotes came through a page summarizer, so they may differ from the page in small ways [Unverified]; the URL is the authority.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
- Sources
|
|
7
|
+
- Colour and contrast
|
|
8
|
+
- Text and layout
|
|
9
|
+
- Keyboard and focus
|
|
10
|
+
- Pointer targets
|
|
11
|
+
- Predictable behaviour
|
|
12
|
+
- Input and errors
|
|
13
|
+
- Names, roles and status
|
|
14
|
+
- Motion and user preferences
|
|
15
|
+
- Desktop tool conventions
|
|
16
|
+
- Token contrast results
|
|
17
|
+
|
|
18
|
+
## Sources
|
|
19
|
+
|
|
20
|
+
| short name | URL |
|
|
21
|
+
|---|---|
|
|
22
|
+
| WCAG | https://www.w3.org/TR/WCAG22/ |
|
|
23
|
+
| Understanding | https://www.w3.org/WAI/WCAG22/Understanding/ followed by the slug and `.html` |
|
|
24
|
+
| C39 | https://www.w3.org/WAI/WCAG22/Techniques/css/C39 |
|
|
25
|
+
| APG keyboard | https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/ |
|
|
26
|
+
| APG names | https://www.w3.org/WAI/ARIA/apg/practices/names-and-descriptions/ |
|
|
27
|
+
| MDN live regions | https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Guides/Live_regions |
|
|
28
|
+
| MDN reduced motion | https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion |
|
|
29
|
+
| MDN contrast | https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-contrast |
|
|
30
|
+
| MDN forced colours | https://developer.mozilla.org/en-US/docs/Web/CSS/@media/forced-colors |
|
|
31
|
+
| MDN system colours | https://developer.mozilla.org/en-US/docs/Web/CSS/system-color |
|
|
32
|
+
| Heuristics | https://www.nngroup.com/articles/ten-usability-heuristics/ |
|
|
33
|
+
| VS Code UX | https://code.visualstudio.com/api/ux-guidelines/ followed by the page name |
|
|
34
|
+
|
|
35
|
+
## Colour and contrast
|
|
36
|
+
|
|
37
|
+
| id | rule | source | in xDev | check |
|
|
38
|
+
|---|---|---|---|---|
|
|
39
|
+
| C1 | Contrast is `(L1 + 0.05) / (L2 + 0.05)` with sRGB linearised at 0.04045; never round, 4.499:1 fails | WCAG glossary; Understanding `contrast-minimum` | Translucent grounds are composited over their base before measuring | audit `contrast` uses this formula |
|
|
40
|
+
| C2 | Text and images of text 4.5:1; large text (24px, or 18.5px bold) 3:1; inactive, decorative and logo text exempt | WCAG 1.4.3 AA; Understanding `contrast-minimum` | Body, label and hint text use `--text-1`, `--text-2`, `--x-color-ink` or `--x-color-muted`. `--text-3` now passes 4.5:1 on every ground (it is the quietest text step) | audit `--contrast`; by hand for text on tints and images |
|
|
41
|
+
| C3 | Parts needed to identify a control or its state, focus indicators and needed graphics 3:1 against adjacent colours; inactive controls exempt | WCAG 1.4.11 AA; Understanding `non-text-contrast` | `--line` and `--x-color-line` are below 3:1. A field or control whose only boundary is that hairline fails; text or an icon that identifies it passes | audit `--contrast` (warn); by hand per control |
|
|
42
|
+
| C4 | The focus ring is a UI component state, so it needs 3:1 | Understanding `non-text-contrast` | `--x-color-focus` passes on every ground in both themes | audit `--contrast` (error level) |
|
|
43
|
+
| C5 | Information is not conveyed by colour alone | Understanding `error-identification` (errors must be in text) | A `StatusDot` has a text label or a tooltip with the state; errors use `Field` `error` text | by hand |
|
|
44
|
+
|
|
45
|
+
## Text and layout
|
|
46
|
+
|
|
47
|
+
| id | rule | source | in xDev | check |
|
|
48
|
+
|---|---|---|---|---|
|
|
49
|
+
| L1 | No loss with line height 1.5, paragraph spacing 2, letter spacing 0.12 and word spacing 0.16 times the font size | WCAG 1.4.12 AA; Understanding `text-spacing` | No fixed `height` on boxes that hold text; truncate with an ellipsis only when the full text is reachable (tooltip, detail) | by hand: apply the four values together and look for clipping |
|
|
50
|
+
| L2 | No two-dimensional scroll at 320 CSS px wide or 256 CSS px high, except regions that need 2D layout (data tables, diagrams, editors, toolbars that must stay in view) | WCAG 1.4.10 AA; Understanding `reflow` | Terminal, diff and editor panes are the 2D exception; their headers, search fields and dialogs still reflow | by hand at 320px wide |
|
|
51
|
+
| L3 | Content shown on hover or focus can be dismissed with Esc, can be hovered, and stays until dismissed | WCAG 1.4.13 AA; Understanding `content-on-hover-or-focus` | `Tooltip` closes on Esc; the pointer can move onto `Popover` | by hand |
|
|
52
|
+
|
|
53
|
+
## Keyboard and focus
|
|
54
|
+
|
|
55
|
+
| id | rule | source | in xDev | check |
|
|
56
|
+
|---|---|---|---|---|
|
|
57
|
+
| K1 | All functions work from the keyboard, except freehand path input | WCAG 2.1.1 A; Understanding `keyboard` (F54) | Drag to resize has `SplitHandle` arrow keys; drag to reorder tabs or panes needs a menu or shortcut equivalent | by hand; no handler on a `div` or `span` without a role and key handler |
|
|
58
|
+
| K2 | Focus can always leave a component by keyboard; a non-standard exit is announced | WCAG 2.1.2 A; Understanding `no-keyboard-trap` | A terminal pane takes Tab and Esc, so xDev needs a documented key to leave it (decision: F6, see platforms) | by hand in every terminal and editor pane |
|
|
59
|
+
| K3 | Focus order keeps meaning; positive `tabindex` fails (F44) | WCAG 2.4.3 A; Understanding `focus-order` | No `tabIndex` above 0 | audit `positive-tabindex` |
|
|
60
|
+
| K4 | A visible focus indicator; removing the outline with no replacement fails (F78) | WCAG 2.4.7 AA; Understanding `focus-visible` | `outline: none` only with a `:focus-visible` replacement for the same selector | audit `focus-outline` |
|
|
61
|
+
| K5 | The focused control is not entirely hidden by author content | WCAG 2.4.11 AA; Understanding `focus-not-obscured-minimum` | Sticky headers, the status bar and toasts must not cover it; use `scroll-padding` on scroll containers | by hand: Tab through a long list under a sticky header |
|
|
62
|
+
| K6 | A composite widget is one Tab stop; arrows move by roving `tabindex` or `aria-activedescendant` | APG keyboard | Menu, tabs, listbox, tree, toolbar and grid follow their row in the patterns file | by hand per component |
|
|
63
|
+
| K7 | Focus never drops to `body`: after a dialog closes, focus the trigger; after a delete, focus the next item | APG keyboard | Lists that delete rows move focus to the next row | by hand |
|
|
64
|
+
| K8 | Shortcuts are not the only way to reach a function; avoid modifier plus Tab, Enter, Space or Esc, Meta plus one key, Alt plus a function key, and screen reader keys | APG keyboard | Every shortcut has a menu item or command palette entry | by hand |
|
|
65
|
+
|
|
66
|
+
## Pointer targets
|
|
67
|
+
|
|
68
|
+
| id | rule | source | in xDev | check |
|
|
69
|
+
|---|---|---|---|---|
|
|
70
|
+
| P1 | Targets at least 24 by 24 CSS px, unless a 24px circle centred on each small target touches no other target or circle, an equivalent control exists, the target is inline, or the size is set by the user agent | WCAG 2.5.8 AA; Understanding `target-size-minimum` | Close buttons on tabs, clear buttons in search fields and swatches are the usual misses | audit `target-size` (warn: the spacing exception needs a person); by hand for the circle test |
|
|
71
|
+
|
|
72
|
+
## Predictable behaviour
|
|
73
|
+
|
|
74
|
+
| id | rule | source | in xDev | check |
|
|
75
|
+
|---|---|---|---|---|
|
|
76
|
+
| B1 | Focus alone does not change context | WCAG 3.2.1 A; Understanding `on-focus` | A tab, row or tree item may show its content on focus; it does not open a window or move focus | by hand |
|
|
77
|
+
| B2 | Changing a value does not change context without warning; revealing more fields is fine | WCAG 3.2.2 A; Understanding `on-input` | A `Switch` that applies at once is not a change of context; a `Select` that navigates is | by hand |
|
|
78
|
+
| B3 | Repeated navigation keeps the same relative order | WCAG 3.2.3 AA; Understanding `consistent-navigation` | Activity bar and sidebar order stays fixed across views | by hand |
|
|
79
|
+
| B4 | The same function has the same name and icon everywhere | WCAG 3.2.4 AA; Understanding `consistent-identification` | One verb per action across the app ("Close", not "Close" and "Dismiss") | by hand; review `en` and `vi` strings |
|
|
80
|
+
| B5 | Repeated help appears in the same order | WCAG 3.2.6 A; Understanding `consistent-help` | Help and About keep one place in the menu. Whether a single window app is a "set of pages" is not stated on the page [Unverified] | by hand |
|
|
81
|
+
| B6 | A timer that hides content needs a way to turn it off, extend it or adjust it, unless the information is available elsewhere | WCAG 2.2.1 A; Understanding `timing-adjustable` | A `Toast` that auto-dismisses repeats information shown elsewhere (the list, the status bar, a log); otherwise it stays until closed | by hand |
|
|
82
|
+
|
|
83
|
+
## Input and errors
|
|
84
|
+
|
|
85
|
+
| id | rule | source | in xDev | check |
|
|
86
|
+
|---|---|---|---|---|
|
|
87
|
+
| E1 | An automatically detected error names the field and says what is wrong in text | WCAG 3.3.1 A; Understanding `error-identification` | `Field` `error` sets the message and `aria-invalid` | by hand |
|
|
88
|
+
| E2 | Every input has a label or instructions | WCAG 3.3.2 A; Understanding `labels-or-instructions` | A placeholder is not the label; use `Field` `label` | by hand |
|
|
89
|
+
| E3 | Suggest the fix when it is known | WCAG 3.3.3 AA; Understanding `error-suggestion` | "Branch exists. Use feature-2?" instead of "Invalid name" | by hand |
|
|
90
|
+
| E4 | Deleting or changing user data is reversible, checked, or confirmed | WCAG 3.3.4 AA; Understanding `error-prevention-legal-financial-data` | Delete uses a modal `Dialog` with `alert`, or an undo | by hand |
|
|
91
|
+
| E5 | Do not ask twice for information in the same process | WCAG 3.3.7 A; Understanding `redundant-entry` | Multi-step setup carries values forward | by hand |
|
|
92
|
+
| E6 | Sign-in needs no cognitive test without a helper; paste and password managers work; manual code transcription fails | WCAG 3.3.8 AA; Understanding `accessible-authentication-minimum` | The sign-in form allows paste and autofill; device codes can be copied or opened as a link; Understanding "Copy and paste": forcing transcription fails unless another method is available | audit `paste-block`, `autocomplete`; by hand |
|
|
93
|
+
|
|
94
|
+
## Names, roles and status
|
|
95
|
+
|
|
96
|
+
| id | rule | source | in xDev | check |
|
|
97
|
+
|---|---|---|---|---|
|
|
98
|
+
| N1 | Every control has a name and role; states are exposed and stay in sync (F59 for a `div` used as a control) | WCAG 4.1.2 A; Understanding `name-role-value` | Use library components or native elements; keep `aria-expanded`, `aria-pressed` and `aria-checked` in sync | audit `icon-button-name`; by hand per patterns file |
|
|
99
|
+
| N2 | Prefer visible text as the name; use `aria-label` only when there is no visible text; translate it; `title` is a last resort | APG names | `IconButton` `label` and `Icon` `label` come from the string table, in `en` and `vi` | audit `icon-button-name`; `i18n-parity` |
|
|
100
|
+
| N3 | Status messages reach assistive technology without focus: `role="status"`, `alert` or `log` | WCAG 4.1.3 AA; Understanding `status-messages` (ARIA22) | `Toast`, `Banner` and `Spinner` already use `role="status"` | by hand: search counts, save confirmations, copy confirmations |
|
|
101
|
+
| N4 | A live region exists before its text changes; `polite` is the norm; `assertive` and `alert` sparingly; do not add `aria-live="assertive"` to `role="alert"` | MDN live regions | Mount the toast region once at the shell, then change its text | by hand |
|
|
102
|
+
|
|
103
|
+
## Motion and user preferences
|
|
104
|
+
|
|
105
|
+
| id | rule | source | in xDev | check |
|
|
106
|
+
|---|---|---|---|---|
|
|
107
|
+
| M1 | Motion triggered by interaction can be turned off unless essential; colour, blur and opacity changes are not motion | WCAG 2.3.3 AAA (adopted as a goal); Understanding `animation-from-interactions` | Slides, scales and spins stop under reduced motion; fades may stay | audit `reduced-motion` |
|
|
108
|
+
| M2 | Test: turn on reduced motion in the OS; each motion is either essential or suppressed | C39 | A `Spinner` is essential progress feedback [Inference]; it may keep turning | by hand on macOS (Reduce motion) and Windows 11 (Animation effects) |
|
|
109
|
+
| M3 | `prefers-reduced-motion` has `no-preference` and `reduce`; the bare query means `reduce` | MDN reduced motion | A single universal guard in the app's base CSS counts for every file | audit `reduced-motion` accepts either form |
|
|
110
|
+
| M4 | `prefers-contrast` has `no-preference`, `more`, `less` and `custom`; `custom` matches forced colours | MDN contrast | The token build ships a `prefers-contrast: more` block that maps `--line` to `--line-strong` and strengthens `--text-2`, `--text-3` and `--x-color-muted` | by hand |
|
|
111
|
+
| M5 | Under `forced-colors: active` the browser forces `color`, `background-color`, `border-color`, `outline-color` and SVG `fill` and `stroke`, and sets `box-shadow` and `text-shadow` to none | MDN forced colours | A focus ring or state drawn only with `box-shadow` disappears. A transparent `outline` next to the shadow becomes visible because its colour is forced [Inference] | audit `forced-colors` |
|
|
112
|
+
| M6 | Fix forced colours with system colours (`Canvas`, `CanvasText`, `ButtonText`, `ButtonBorder`, `Highlight`, `HighlightText`, `GrayText` for disabled); use `forced-color-adjust: none` only for small parts | MDN forced colours; MDN system colours | Selected rows use `Highlight` and `HighlightText`; disabled text `GrayText` | by hand with a Windows contrast theme |
|
|
113
|
+
|
|
114
|
+
## Desktop tool conventions
|
|
115
|
+
|
|
116
|
+
These come from the VS Code UX guidelines. They are advice for a developer tool, not conformance rules.
|
|
117
|
+
|
|
118
|
+
| id | rule | source page | in xDev |
|
|
119
|
+
|---|---|---|---|
|
|
120
|
+
| V1 | Notifications only when needed, one at a time, never repeated, never for promotion; offer "Do not show again" | `notifications` | Use `Toast` for results of the user's own action; use the status bar for background state |
|
|
121
|
+
| V2 | Background progress goes in the status bar with a loading icon; a progress notification only when attention is needed, with cancel and a details link | `status-bar`, `notifications` | Long jobs show a status bar item; the notification has Cancel |
|
|
122
|
+
| V3 | Modal dialogs only when an immediate decision is needed, never for plain messages or actions the user did not start | `notifications` | No modal for "Saved" or "Update available" |
|
|
123
|
+
| V4 | Status bar: short text, icons only for clear metaphors, global items left and contextual items right, no custom colours; error backgrounds only as a last resort | `status-bar` | `StatusBar` left is workspace, right is the active pane |
|
|
124
|
+
| V5 | Commands have clear names, a category, keyboard shortcuts where useful, no emoji, and do not override existing shortcuts | `command-palette` | `CommandPalette` entries are "Category: Verb object" with the chord shown |
|
|
125
|
+
| V6 | Quick picks have a placeholder, use the description for the current value and detail for brief context, and offer "Create new" in a pick list | `quick-picks` | `SearchPicker` and `CommandPalette` placeholders say what is searched |
|
|
126
|
+
| V7 | Views: tree items are not single-action buttons, at most three actions per item, few views per sidebar (3 to 5) | `views`, `sidebars` | `TreeView` rows open on Enter; extra actions go in a context menu |
|
|
127
|
+
| V8 | Welcome (empty) views: links before buttons, buttons only for primary actions, short content, no "read more" link text | `views` | `EmptyState` has one action and a specific link text |
|
|
128
|
+
| V9 | Context menus show only actions that apply, grouped, with large groups in a submenu | `context-menus` | `Menu` groups use separators |
|
|
129
|
+
| V10 | Settings have a default and a clear, short description; link related settings | `settings` | `SettingRow` has a description; the default is shown or resettable |
|
|
130
|
+
|
|
131
|
+
## Token contrast results
|
|
132
|
+
|
|
133
|
+
Measured with the C1 formula over the dark and light values in `ai-manifest.json`. Every pair at error level passes, including `--text-3` on every ground and `--line-strong` (the control edge). The hairlines below are decorative and stay under 3:1; the audit reports them as warnings. A control whose border is its only boundary uses `--line-strong` or `--x-color-line-strong`.
|
|
134
|
+
|
|
135
|
+
| pair | need | dark | light |
|
|
136
|
+
|---|---|---|---|
|
|
137
|
+
| `--line` on `--bg-0` | 3 | 1.26 | 1.22 |
|
|
138
|
+
| `--line` on `--bg-1` | 3 | 1.22 | 1.34 |
|
|
139
|
+
| `--line` on `--bg-2` | 3 | 1.15 | 1.34 |
|
|
140
|
+
| `--x-color-line` on bg | 3 | 1.48 | 1.20 |
|
|
141
|
+
| `--x-color-line` on panel | 3 | 1.39 | 1.35 |
|
|
142
|
+
| `--x-color-line` on surface | 3 | 1.30 | 1.35 |
|
|
143
|
+
|
|
144
|
+
A hairline between regions is not a control boundary and needs no ratio. The risk is a field or control whose only visible edge is one of these lines (C3).
|