@beehexa/design-rules 2611.4.1 → 2611.5.3

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.
Files changed (157) hide show
  1. package/dist/catalog.json +602 -248
  2. package/dist/docs/public/_redirects +2 -0
  3. package/dist/docs/scripts/token-utils.d.mts +5 -1
  4. package/dist/docs/scripts/token-utils.mjs +28 -3
  5. package/dist/docs/src/brand/structure-proposal.md +1 -1
  6. package/dist/docs/src/components/ColorDemo.astro +52 -14
  7. package/dist/docs/src/components/MotionDemo.astro +135 -0
  8. package/dist/docs/src/components/NativeControlsDemo.astro +279 -0
  9. package/dist/docs/src/components/OpacityDemo.astro +8 -8
  10. package/dist/docs/src/components/RoleGuides.astro +2 -2
  11. package/dist/docs/src/components/ShapeDemo.astro +78 -35
  12. package/dist/docs/src/components/SiteHeader.astro +19 -4
  13. package/dist/docs/src/components/SystemAreas.astro +1 -1
  14. package/dist/docs/src/components/TokenTable.astro +16 -1
  15. package/dist/docs/src/components/TypeDemo.astro +15 -15
  16. package/dist/docs/src/components/ZIndexDemo.astro +1 -1
  17. package/dist/docs/src/components/logos/LogoInUse.astro +3 -3
  18. package/dist/docs/src/content/components/button/accessibility.mdx +41 -8
  19. package/dist/docs/src/content/components/button/code.mdx +8 -1
  20. package/dist/docs/src/content/components/button/examples.mdx +23 -4
  21. package/dist/docs/src/content/components/button/usage.mdx +26 -0
  22. package/dist/docs/src/content/components/resizable-panel/accessibility.mdx +61 -0
  23. package/dist/docs/src/content/components/resizable-panel/changelog.mdx +20 -0
  24. package/dist/docs/src/content/components/resizable-panel/code.mdx +79 -0
  25. package/dist/docs/src/content/components/resizable-panel/examples.mdx +85 -0
  26. package/dist/docs/src/content/components/resizable-panel/meta.json +5 -0
  27. package/dist/docs/src/content/components/resizable-panel/usage.mdx +101 -0
  28. package/dist/docs/src/content/foundations/guidelines/accessibility/keyboard-and-focus.mdx +75 -0
  29. package/dist/docs/src/content/foundations/guidelines/accessibility/statement.mdx +45 -0
  30. package/dist/docs/src/content/foundations/guidelines/accessibility/testing.mdx +58 -0
  31. package/dist/docs/src/content/foundations/guidelines/accessibility.mdx +100 -11
  32. package/dist/docs/src/content/foundations/guidelines/content.mdx +11 -2
  33. package/dist/docs/src/content/foundations/index.mdx +3 -3
  34. package/dist/docs/src/content/foundations/styles/border.mdx +10 -3
  35. package/dist/docs/src/content/foundations/styles/color/accessibility.mdx +4 -2
  36. package/dist/docs/src/content/foundations/styles/color/dark-mode.mdx +2 -2
  37. package/dist/docs/src/content/foundations/styles/color/index.mdx +14 -2
  38. package/dist/docs/src/content/foundations/styles/color/palette.mdx +4 -4
  39. package/dist/docs/src/content/foundations/styles/color/tokens.mdx +2 -2
  40. package/dist/docs/src/content/foundations/styles/color/usage.mdx +25 -3
  41. package/dist/docs/src/content/foundations/styles/data-visualization.mdx +76 -0
  42. package/dist/docs/src/content/foundations/styles/elevation.mdx +7 -1
  43. package/dist/docs/src/content/foundations/styles/icons/accessibility.mdx +1 -1
  44. package/dist/docs/src/content/foundations/styles/icons/code.mdx +6 -18
  45. package/dist/docs/src/content/foundations/styles/icons/index.mdx +2 -2
  46. package/dist/docs/src/content/foundations/styles/icons/usage.mdx +4 -2
  47. package/dist/docs/src/content/foundations/styles/interaction-states.mdx +82 -9
  48. package/dist/docs/src/content/foundations/styles/layout/app-frame.mdx +2 -4
  49. package/dist/docs/src/content/foundations/styles/layout/breakpoints.mdx +10 -7
  50. package/dist/docs/src/content/foundations/styles/layout/grid.mdx +4 -2
  51. package/dist/docs/src/content/foundations/styles/layout/index.mdx +3 -3
  52. package/dist/docs/src/content/foundations/styles/layout/overlays.mdx +28 -37
  53. package/dist/docs/src/content/foundations/styles/layout/page-widths.mdx +4 -4
  54. package/dist/docs/src/content/foundations/styles/logos/downloads-and-terms.mdx +7 -7
  55. package/dist/docs/src/content/foundations/styles/logos/index.mdx +13 -2
  56. package/dist/docs/src/content/foundations/styles/logos/placement-and-containers.mdx +4 -2
  57. package/dist/docs/src/content/foundations/styles/logos/product-logos.mdx +2 -2
  58. package/dist/docs/src/content/foundations/styles/logos/using-the-logo.mdx +3 -1
  59. package/dist/docs/src/content/foundations/styles/motion.mdx +131 -3
  60. package/dist/docs/src/content/foundations/styles/opacity.mdx +7 -1
  61. package/dist/docs/src/content/foundations/styles/radius.mdx +63 -15
  62. package/dist/docs/src/content/foundations/styles/scrollbars.mdx +176 -0
  63. package/dist/docs/src/content/foundations/styles/size-and-density.mdx +16 -6
  64. package/dist/docs/src/content/foundations/styles/spacing.mdx +17 -3
  65. package/dist/docs/src/content/foundations/styles/typography/code.mdx +4 -2
  66. package/dist/docs/src/content/foundations/styles/typography/index.mdx +13 -3
  67. package/dist/docs/src/content/foundations/styles/typography/usage.mdx +5 -3
  68. package/dist/docs/src/content/foundations/styles/typography/vietnamese.mdx +2 -2
  69. package/dist/docs/src/content/foundations/styles/z-index.mdx +4 -0
  70. package/dist/docs/src/content/foundations/tokens/all-tokens.mdx +11 -0
  71. package/dist/docs/src/content/foundations/tokens/index.mdx +17 -9
  72. package/dist/docs/src/content/get-started/design.mdx +1 -1
  73. package/dist/docs/src/content/get-started/develop.mdx +2 -6
  74. package/dist/docs/src/content/get-started/index.mdx +1 -1
  75. package/dist/docs/src/content/release-phases/index.mdx +1 -1
  76. package/dist/docs/src/content/tools/ant-design-vue-theme.mdx +474 -12
  77. package/dist/docs/src/content/tools/application-content.mdx +166 -32
  78. package/dist/docs/src/content/tools/editors.mdx +247 -3
  79. package/dist/docs/src/content/tools/eslint.mdx +1 -1
  80. package/dist/docs/src/content/tools/index.mdx +2 -2
  81. package/dist/docs/src/content/tools/mermaid.mdx +108 -13
  82. package/dist/docs/src/content/tools/vueflow.mdx +58 -0
  83. package/dist/docs/src/content-vi/foundations/guidelines/accessibility/keyboard-and-focus.mdx +75 -0
  84. package/dist/docs/src/content-vi/foundations/guidelines/accessibility/statement.mdx +45 -0
  85. package/dist/docs/src/content-vi/foundations/guidelines/accessibility/testing.mdx +58 -0
  86. package/dist/docs/src/content-vi/foundations/guidelines/accessibility.mdx +108 -0
  87. package/dist/docs/src/content-vi/foundations/guidelines/content.mdx +34 -0
  88. package/dist/docs/src/content-vi/foundations/index.mdx +9 -0
  89. package/dist/docs/src/content-vi/foundations/styles/border.mdx +9 -3
  90. package/dist/docs/src/content-vi/foundations/styles/color/accessibility.mdx +4 -2
  91. package/dist/docs/src/content-vi/foundations/styles/color/dark-mode.mdx +2 -2
  92. package/dist/docs/src/content-vi/foundations/styles/color/index.mdx +14 -2
  93. package/dist/docs/src/content-vi/foundations/styles/color/palette.mdx +5 -5
  94. package/dist/docs/src/content-vi/foundations/styles/color/tokens.mdx +2 -2
  95. package/dist/docs/src/content-vi/foundations/styles/color/usage.mdx +24 -2
  96. package/dist/docs/src/content-vi/foundations/styles/elevation.mdx +7 -1
  97. package/dist/docs/src/content-vi/foundations/styles/icons/accessibility.mdx +1 -1
  98. package/dist/docs/src/content-vi/foundations/styles/icons/code.mdx +6 -18
  99. package/dist/docs/src/content-vi/foundations/styles/icons/index.mdx +2 -2
  100. package/dist/docs/src/content-vi/foundations/styles/icons/usage.mdx +4 -2
  101. package/dist/docs/src/content-vi/foundations/styles/interaction-states.mdx +22 -8
  102. package/dist/docs/src/content-vi/foundations/styles/layout/app-frame.mdx +3 -1
  103. package/dist/docs/src/content-vi/foundations/styles/layout/breakpoints.mdx +10 -7
  104. package/dist/docs/src/content-vi/foundations/styles/layout/grid.mdx +4 -2
  105. package/dist/docs/src/content-vi/foundations/styles/layout/index.mdx +3 -3
  106. package/dist/docs/src/content-vi/foundations/styles/layout/overlays.mdx +36 -0
  107. package/dist/docs/src/content-vi/foundations/styles/layout/page-widths.mdx +5 -1
  108. package/dist/docs/src/content-vi/foundations/styles/logos/downloads-and-terms.mdx +7 -7
  109. package/dist/docs/src/content-vi/foundations/styles/logos/index.mdx +13 -2
  110. package/dist/docs/src/content-vi/foundations/styles/logos/placement-and-containers.mdx +4 -2
  111. package/dist/docs/src/content-vi/foundations/styles/logos/product-logos.mdx +2 -2
  112. package/dist/docs/src/content-vi/foundations/styles/logos/using-the-logo.mdx +3 -1
  113. package/dist/docs/src/content-vi/foundations/styles/motion.mdx +139 -0
  114. package/dist/docs/src/content-vi/foundations/styles/opacity.mdx +8 -2
  115. package/dist/docs/src/content-vi/foundations/styles/radius.mdx +63 -15
  116. package/dist/docs/src/content-vi/foundations/styles/size-and-density.mdx +16 -6
  117. package/dist/docs/src/content-vi/foundations/styles/spacing.mdx +17 -3
  118. package/dist/docs/src/content-vi/foundations/styles/typography/code.mdx +4 -2
  119. package/dist/docs/src/content-vi/foundations/styles/typography/index.mdx +14 -4
  120. package/dist/docs/src/content-vi/foundations/styles/typography/usage.mdx +4 -2
  121. package/dist/docs/src/content-vi/foundations/styles/typography/vietnamese.mdx +2 -2
  122. package/dist/docs/src/content-vi/foundations/styles/z-index.mdx +4 -0
  123. package/dist/docs/src/content-vi/foundations/tokens/all-tokens.mdx +47 -0
  124. package/dist/docs/src/content-vi/foundations/tokens/index.mdx +35 -0
  125. package/dist/docs/src/lib/i18n.ts +0 -1
  126. package/dist/docs/src/lib/token-descriptions-vi.ts +60 -9
  127. package/dist/docs/src/lib/tokens.ts +3 -0
  128. package/dist/docs/src/styles/chrome.css +10 -3
  129. package/dist/docs/src/styles/color.css +33 -23
  130. package/dist/docs/src/styles/docs.css +26 -28
  131. package/dist/docs/src/styles/elevation.css +4 -4
  132. package/dist/docs/src/styles/global.css +21 -1
  133. package/dist/docs/src/styles/icons.css +10 -9
  134. package/dist/docs/src/styles/kit.css +36 -32
  135. package/dist/docs/src/styles/layout.css +7 -7
  136. package/dist/docs/src/styles/motion.css +34 -0
  137. package/dist/docs/src/styles/opacity.css +3 -3
  138. package/dist/docs/src/styles/scrollbars.css +74 -0
  139. package/dist/docs/src/styles/shapes.css +21 -11
  140. package/dist/docs/src/styles/tokens.css +392 -12
  141. package/dist/docs/src/styles/tokens.js +185 -6
  142. package/dist/docs/src/styles/typography.css +4 -4
  143. package/dist/docs/src/styles/zindex.css +10 -7
  144. package/dist/docs/tokens/color.json +18 -1
  145. package/dist/docs/tokens/content.json +8 -3
  146. package/dist/docs/tokens/diagram.json +9 -3
  147. package/dist/docs/tokens/flow.json +2 -2
  148. package/dist/docs/tokens/layout.json +4 -0
  149. package/dist/docs/tokens/motion.json +37 -5
  150. package/dist/docs/tokens/radius.json +52 -8
  151. package/dist/docs/tokens/resize.json +12 -0
  152. package/dist/docs/tokens/scrollbar.json +40 -0
  153. package/dist/docs/tokens/size.json +1 -1
  154. package/dist/docs/tokens/spacing.json +31 -1
  155. package/dist/docs/tokens/switch.json +280 -0
  156. package/dist/index.js +602 -248
  157. package/package.json +1 -1
@@ -31,10 +31,12 @@ its inspector and its exported artifact.
31
31
 
32
32
  - Default and indeterminate nodes use `node-*` neutral pairs.
33
33
  - `state-ran-ok` means **ran without a reported failure**, not a verified business
34
- success. Neutral solid paint preserves this distinction from success status,
35
- successful HTTP response, and warning. An HTTP response or business outcome
36
- still uses the appropriate success/danger role in its own status label.
34
+ success. Informational paint and a completion marker distinguish execution from
35
+ untouched nodes without using business-success green. HTTP/business outcomes
36
+ retain their appropriate status labels independently.
37
37
  - Failed nodes use `fail-*`, with a failure marker and state text.
38
+ - Log-only `log-reached` uses a reach marker. `log-unfinished` uses warning
39
+ paint, an ellipsis and a dashed boundary; it is never a proven failure.
38
40
  - Never-reached nodes use `unreached-*` and an explicit state label; they are not
39
41
  disabled controls. Not-taken branches use `nottaken-*` plus a dashed boundary.
40
42
  - Repeat counts use the neutral `badge-*` pair. Repetition alone is not a warning.
@@ -57,17 +59,64 @@ Vietnamese marks and long labels wrap without clipping. `diagram.padding` is int
57
59
  node padding; `diagram.export-padding` frames fitted/exported drawing bounds. Graph
58
60
  coordinates and existing layout topology are not spacing-scale choices.
59
61
 
60
- The adapter's SVG stylesheet also adapts renderer-owned execution-card labels.
61
- It replaces their inline 11px/650-weight recipes with `font.heading.xsmall` and
62
- `font.body.small`, and removes category-tile translucent tints and inset shadows.
63
- `diagram.card-width`, `diagram.tile-size` and `diagram.glyph-size` retain the
64
- measurable fixed card and symbol geometry; these are not marketing display type.
65
- This narrowly scoped stylesheet is the framework gap boundary, not permission for
66
- page CSS to override definition-owned run-state paint.
62
+ Native compact worker flows keep the actual `compactFlowMermaid` output and the
63
+ public `flowStylesheet()` from `@beehexa/hexasync-template-model`. Install that
64
+ sheet before Mermaid measures labels, then include it in the SVG for standalone
65
+ export. Add `hx-flow` to the SVG root and bind `workerFlowSvgStyle(canvas)` from
66
+ `@beehexa/mermaid-tokens` as its inline style. Native card geometry, family masks
67
+ and typed state line-work remain native; the adapter owns literal source paint,
68
+ neutral category tile/glyph pairs and the canonical tile radius.
69
+
70
+ The installed worker package emits compact labels and has no rich-label/DOM
71
+ callback option. Its own stylesheet uses `p::first-line`, which cannot identify
72
+ the full wrapped title independently from the subtitle. Full rich-title parity
73
+ requires an upstream public anatomy/label capability. Do not add a downstream
74
+ emitter, label DOM mutation or first-line workaround to simulate that capability.
67
75
  Embedded SVG CSS also supplies opaque source edge-label pairs and explicit
68
76
  `"cv05", "cv08"` features alongside the complete font shorthand; SVG/export must
69
77
  not depend on the document's universal font-feature rule.
70
78
 
79
+ Interactive preview nodes opt in with `bh-mermaid-interactive-node` on the actual
80
+ SVG group. Keep native role/tabindex, keyboard handling and real selection state;
81
+ bind `aria-selected="true"` for a supported selectable role or `aria-pressed="true"`
82
+ for a toggle button, never merely for expansion. The embedded
83
+ stylesheet adds `border.width.focused` / `diagram.selection-ring` outside the node
84
+ on hover, focus-visible and selection with `state.focus.offset`; it never repaints
85
+ run-state fill/stroke. `bh-mermaid-category-glyph` on authored SVG icon paths uses
86
+ `diagram.tile-glyph`, `border.width.default` and round caps/joins. Path coordinates
87
+ and transforms remain graph geometry.
88
+
89
+ Import `@beehexa/mermaid-tokens/css` once for HTML surrounding the SVG.
90
+ `data-bh-diagram="canvas|code|key|value|description|badge"` selects existing
91
+ `diagram.canvas`, `code-bg`, `code-key`, `code-value`, `node-desc` and the paired
92
+ repeat-count badge roles. The badge recipe includes its ordinary `radius.050`
93
+ label frame; content font markers and structural composition remain independent.
94
+ No local colour, border or canvas-background recipes are required.
95
+
96
+ Embedded `foreignObject` text also sets `-webkit-text-fill-color: currentcolor`.
97
+ This bridges HTML-to-image clones to the already resolved SVG label colour rather
98
+ than a document host's inherited text-fill; do not inject a second app stylesheet
99
+ during PNG capture.
100
+
101
+ Actual pan/zoom hosts use `bh-diagram-viewport`, with
102
+ `data-bh-dragging="true"` only during dragging, for grab/grabbing, touch-action
103
+ and user-select behavior. The application retains event handling, pointer capture,
104
+ viewport transforms, clipping and fit/export bounds; no native Mermaid layout API
105
+ can replace those application gesture mechanics. Rich nodes with decorated outer
106
+ rings use `data-bh-clickable="true"` and `data-bh-ring="hover"` on the hover ring.
107
+ Embedded CSS owns pointer/hover visibility, without changing ring geometry or the
108
+ separate selection/disclosure state.
109
+
110
+ Native evidence-navigation buttons use `data-bh-diagram="occurrence"` with
111
+ `aria-current="true"` to underline the current occurrence. This is navigation
112
+ state, not an execution-status colour; native focus/keyboard behavior stays intact.
113
+
114
+ Rectangular node/cluster/actor/note surfaces, execution cards, category tiles and
115
+ small label surfaces use `radius.100` (8 px), including SVG export. Circles,
116
+ diamonds and edge paths retain topology geometry. Consumer-owned inspector cards
117
+ and viewport controls/toolbars use `--bh-radius-100`; dialogs/drawers use
118
+ `radius.150` (12 px). Follow the [Radius role scale](/foundations/styles/radius/).
119
+
71
120
  Authoring previews use `diagram.preview-height` for both split panels and
72
121
  `diagram.minimum-height` for the drawing viewport; fullscreen fills the enclosing
73
122
  host instead. Read-only split diagrams retain a zero minimum so they shrink with
@@ -82,9 +131,10 @@ failure markers. Controls stay outside the captured SVG host.
82
131
 
83
132
  ## Export the rendered theme
84
133
 
85
- Resolve literal token values when drawing: Mermaid style statements cannot resolve
86
- CSS variables. Snapshot the rendered theme and opaque canvas background on the SVG
87
- host. Export the live, fully decorated drawing at its natural bounds with
134
+ Resolve literal token values for Mermaid configuration fields that require them.
135
+ Native worker-flow CSS uses its own `--hx-*` properties; Source supplies their
136
+ semantic paint and preserves native literal evidence-edge/arrowhead paint.
137
+ Snapshot the rendered theme and opaque canvas background on the SVG host. Export the live, fully decorated drawing at its natural bounds with
88
138
  `exportPadding`, not the transformed viewport. Preserve the snapshot even if the
89
139
  application theme changes before the new drawing lands. Fonts, locale line height,
90
140
  state paint and outer selection geometry must survive SVG/PNG capture. A transparent
@@ -93,3 +143,48 @@ image or white sheet behind dark labels is not a valid fallback.
93
143
  All package source is in `tokens/diagram.json`; consumers must not maintain a
94
144
  second palette or copy generated token values. Local package references are for
95
145
  local development only until an authorized release exists.
146
+
147
+ Use the actual installed model APIs: `compactWorkerFlow` supplies its public
148
+ compact graph and authored-address-to-compact-id map, and `compactFlowMermaid`
149
+ serializes that graph. `RenderNodeOverlay` accepts only `{ state?, repeat? }`;
150
+ do not pass `roles`, caller colour resolvers, stroke overrides or unsupported
151
+ renderer options. The native model owns state readings, repeat badges and
152
+ implicit `indeterminate` nodes once any drawn state is supplied.
153
+
154
+ Log mentions establish only `reached` or `unfinished`, never typed `ranOk` or
155
+ `ranFailed` evidence. The Source `mermaidEvidenceStyles` adapter accepts compact
156
+ node IDs, actual public compact edge indices and explicit `{ dark, locale }`.
157
+ Typed evidence takes precedence for named steps and their owned junctions, even when
158
+ a failed owner's junction has no explicit state. Consumers retain authored
159
+ address resolution, failure attribution, repeated occurrences and execution data;
160
+ source owns theme paint and interaction recipes. No second palette is required.
161
+
162
+ Edge emphasis uses literal Source colours, not `var(...)` or custom-property
163
+ declarations: Mermaid12's DSL rejects those functions. Do not append `!important`
164
+ inside the DSL: native coloured-marker cloning treats that suffix as part of
165
+ the SVG colour attribute. After rendering/sanitization,
166
+ `preserveMermaidDefinitionPaint(svg)` promotes the actual native edge stroke and
167
+ explicit coloured-marker attributes over the worker sheet's neutral important
168
+ paint, without changing paths, marker geometry or IDs. Unknown transitions remain
169
+ unknown; consecutive recorded global indices may prove a unique direct edge,
170
+ but two executed endpoints alone do not prove a typed traversal.
171
+
172
+ ## Shared drawing viewport and dock
173
+
174
+ Data Flow is the canonical canvas reference: `diagram.canvas` and `diagram.grid`,
175
+ with native18px grid spacing and1.2px dots in camera coordinates. These are graph
176
+ geometry, not reader-target dimensions. `.bh-diagram-viewport` supplies the Source
177
+ dot pattern; bind its `--bh-canvas-grid-x`, `--bh-canvas-grid-y` and
178
+ `--bh-canvas-grid-scale` to the existing camera. The SVG root and default stage
179
+ body (`diagram.group-fill`) are transparent on screen, not opaque pale sheets
180
+ covering the grid. Native stage boundaries/titles remain intact. Export still
181
+ uses the rendered theme's snapshotted opaque Source canvas.
182
+
183
+ Put real native controls **inside** that viewport, outside the transformed drawing
184
+ and captured SVG host. `bh-diagram-dock` on native Space plus `bh-control-group`
185
+ `data-bh-variant="dock"` supplies the lower-left floating dock and shared native
186
+ Data Flow control family. No separate external toolbar/header row and no reserved
187
+ blank band. Stop pointer/wheel/non-Escape keyboard propagation on the dock,
188
+ preserving native focus, popups and overlay Escape handling. Keep genuine action
189
+ differences; do not copy Data Flow-only actions into Mermaid.
190
+
@@ -62,6 +62,13 @@ light/dark role. Use `getNodeColorPalette(category)` for CSS-backed bindings and
62
62
  `getNodeColor(nodeType)` for the frame/edge identity. These source roles replace historical
63
63
  application-owned palettes, alpha overlays, gradients and palette-adjustment functions.
64
64
  Never append hex alpha suffixes to a CSS variable, or lighten a resolved role downstream.
65
+ For a native category Tag, bind `getFlowCategoryBadgeStyles(nodeType)` to the
66
+ public `style` prop and omit `color`. This cached immutable recipe pairs the
67
+ category foreground/background/border instead of putting native white text on a
68
+ frame/edge stroke. The canonical contrast check includes all eight small-text
69
+ category pairs in both themes at WCAG AA 4.5:1; the native family demonstrates
70
+ their actual paint. Decision foreground and border remain separate roles.
71
+
65
72
 
66
73
  Selection uses `color.border.selected` plus the selected outline; keyboard focus separately
67
74
  uses `color.border.focus`, the focused border width and `state.focus.offset`. Errors use the
@@ -78,6 +85,22 @@ labels, handles, accessibility semantics and events in the application. Meaningf
78
85
  indicators may move; decorative node entrances, pulsing identities, rotating idle icons,
79
86
  hover transforms, flowing edge dashes, gradients and glass are not part of the theme.
80
87
 
88
+ Custom semantic category content uses `getFlowCategoryStyles(type, part?)`;
89
+ `foreground` sets category text, `border` sets border colour and `background`
90
+ sets its paired surface. Category glyphs use `getFlowIconStyles(type, options)`,
91
+ whose default colour is category border, not text. Options accept source icon
92
+ size names or numeric API sizes, an already source-resolved colour, and disabled.
93
+ Status icon keys (`status-success|warning|error|info|loading`) and control keys
94
+ (`control-expand|collapse|help`) resolve separate operational/neutral icon roles.
95
+ `edge-dependency|edge-transformation` preserve their categorical identity.
96
+ `bh-flow-icon[data-bh-loading="true"]` supplies meaningful loading motion with
97
+ reduced-motion support. Never animate an idle category icon.
98
+
99
+ For a labelled relationship indicator use `bh-flow-category-mark` and
100
+ `data-bh-category="<FlowCategory>"`: the source owns its `space.075` circular
101
+ geometry and categorical border-colour fill. A label/count must preserve the
102
+ non-colour meaning; this mark does not communicate execution status.
103
+
81
104
  `NODE_DIMENSIONS`, `GRID_SPACING` and `TASK_DATA_LAYOUT` read `tokens/flow.json`. The scoped
82
105
  operational matrix is: task, task dependency, task transformation and task data **450×130**;
83
106
  three groups **350×130**; validation, transformation and push step **200×130**;
@@ -89,6 +112,24 @@ Graph layout coordinates, intrinsic sizing, flex/grid mechanics and viewport tra
89
112
  not palette values. Do not arbitrarily round them to the spacing scale. Category adaptation
90
113
  must not mutate the graph's IDs, expansion state, saved positions or relationship semantics.
91
114
 
115
+ Ordinary node bodies, MiniMap cards and Controls frames use `radius.100` (8 px).
116
+ Controls round exposed button corners without clipping focus. Connector logos
117
+ retain their nested `radius.075` (6 px). Decision and loop nodes keep their true
118
+ circular geometry, as do connection handles; edge-routing radius remains path
119
+ geometry. Custom inspector cards and graph controls/toolbars use `--bh-radius-100`;
120
+ dialogs/drawers use `radius.150` (12 px). Follow the [Radius role scale](/foundations/styles/radius/).
121
+
122
+ Bind the user's high-contrast setting to `data-bh-high-contrast="true"` on the actual
123
+ `bh-vue-flow` host. The companion CSS widens node/edge/path, button and custom
124
+ `role="button"` focus outlines from `border.width.focused` (2 px) to
125
+ `border.width.accent` (4 px), preserving source focus colour/offset. Do not keep
126
+ an application-owned descendant focus recipe.
127
+
128
+ The same host accepts `data-bh-large-text="true"` and
129
+ `data-bh-increased-spacing="true"` for the user's opt-in accessibility settings:
130
+ 1.125em node text, and 1.6 line-height / 0.02em letter-spacing respectively.
131
+ Keep actual user preference bindings; do not duplicate descendant CSS locally.
132
+
92
133
  ## Edges, controls and export
93
134
 
94
135
  `styleTargetEdge(edge, nodes)` preserves the directed edge's target identity on both stroke
@@ -97,6 +138,17 @@ may retain dashed lines to communicate transformation or conditional semantics.
97
138
  edge renderer must consume the supplied stroke rather than replace it with an unrelated
98
139
  edge palette. `FLOW_EDGE` centralizes widths, marker size, path radius and handle size.
99
140
 
141
+ Custom edge paths use `getFlowEdgeStyles(category, suppliedStyle?)` for the full
142
+ SVG presentation recipe. It preserves a supplied directed target stroke over the
143
+ category fallback, uses `FLOW_EDGE.width`, no fill, non-scaling stroke and static
144
+ relation dashes (solid dependency; dashed transformation/conditional/dataFlow).
145
+ Path coordinates, marker shapes and relationship direction remain graph geometry.
146
+ Edge styles and node container styles use VueFlow's public `Styles` type, including
147
+ custom theme variables. Detail simplification accepts and returns that same native
148
+ contract; applications do not need casts or copied style objects to assign it.
149
+ `styleTargetEdge` retains an explicit open/closed arrow kind and resolves a missing
150
+ target type through `data.nodeType` before the task-category fallback.
151
+
100
152
  The CSS companion addresses actual VueFlow core/default nodes, handles, edge labels, selection,
101
153
  Controls buttons and MiniMap surfaces. Controls preserve normal, hover, disabled and focus
102
154
  states and enlarge to source touch targets for coarse pointers. Import it after upstream CSS;
@@ -112,6 +164,12 @@ Graph fullscreen uses an isolated local stacking context at `z-index.modal` (400
112
164
  ordering such as z10/z15 stays inside that context; do not assign global1001/1002
113
165
  to graph controls. Verify real inspector/dialog ordering, Escape and focus return.
114
166
 
167
+ `getFlowDetailStyles(level, suppliedStyle)` removes shadow at minimal detail;
168
+ basic and detailed return the supplied style unchanged. It never reduces opacity:
169
+ node state, text contrast, focus and category semantics must remain readable at
170
+ every zoom level. Viewport thresholds, metadata, measured positions and scheduling
171
+ remain consumer logic; no nodes, relationships or data fields may be discarded.
172
+
115
173
  ## Verification
116
174
 
117
175
  Exercise light and dark, English and Vietnamese, selected plus focused and error nodes,
@@ -0,0 +1,75 @@
1
+ ---
2
+ title: Bàn phím và focus
3
+ description: Nhiều người không bao giờ dùng chuột. Focus di chuyển qua màn hình thế nào, focus ring trông ra sao, và mỗi loại control dùng phím gì.
4
+ order: 1
5
+ audience: Designer, developer
6
+ updated: 2026-11-04
7
+ ---
8
+
9
+ Nhiều người không bao giờ chạm vào chuột: người dùng trình đọc màn hình, người bị run tay hay gãy cổ tay, và những người làm nhanh hơn với phím tắt. Với họ, bàn phím là toàn bộ giao diện.
10
+
11
+ ## Thứ tự focus
12
+
13
+ **Focus đi theo thứ tự người ta đọc: từ trên xuống dưới, từ đầu tới cuối mỗi dòng.**
14
+
15
+ - Trong bản thiết kế, đánh số các điểm dừng Tab, để khi dựng sẽ theo đúng thứ tự đó.
16
+ - Giữ thứ tự DOM giống thứ tự nhìn thấy. Không sửa thứ tự bằng `tabindex` dương.
17
+ - Bắt đầu mỗi trang bằng một link "Bỏ qua tới nội dung", nhảy qua header và menu bên.
18
+ - Chỉ những thứ người dùng thao tác được mới nhận focus. Dùng `tabindex="0"` cho control tự làm hoặc vùng cuộn, không bao giờ cho chữ hay tiêu đề.
19
+ - Vùng cuộn ngang, như một bảng rộng, nhận focus để người dùng cuộn bằng phím mũi tên. Đặt tên cho nó bằng `aria-label`.
20
+
21
+ ## Focus ring
22
+
23
+ **Focus của bàn phím luôn nhìn thấy: viền 2 px, cách thành phần 2 px.**
24
+
25
+ | Phần | Token | Giá trị |
26
+ | --- | --- | --- |
27
+ | Màu | `color.border.focus` | Xanh dương, tương phản ít nhất 3:1 với trang ở giao diện sáng và tối |
28
+ | Độ dày | `border.width.focused` | 2 px |
29
+ | Khoảng cách | `state.focus.offset` | 2 px |
30
+
31
+ - Hiện ring bằng `:focus-visible`, để click chuột không vẽ ring nhưng bàn phím thì luôn vẽ.
32
+ - Không bao giờ bỏ outline mà không đặt lại một ring giống vậy.
33
+ - Ring không bao giờ màu vàng: vàng thương hiệu quá nhạt trên nền trắng nên không nhìn thấy.
34
+ - Header dính, drawer hay toast không được che thành phần đang có focus. Chừa chỗ bằng `scroll-padding-top`.
35
+
36
+ ## Di chuyển focus
37
+
38
+ **Khi một thứ mở ra, focus đi vào trong nó. Khi nó đóng lại, focus quay về thứ đã mở nó.**
39
+
40
+ | Khi | Focus đi tới | Khi đóng |
41
+ | --- | --- | --- |
42
+ | Dialog mở | Ô nhập đầu tiên, hoặc tiêu đề của dialog nếu không có ô nhập | Quay về nút đã mở nó |
43
+ | Drawer hoặc menu mở | Mục đầu tiên | Quay về nút đã mở nó |
44
+ | Toast hiện ra | Giữ nguyên chỗ cũ; nội dung toast được đọc lên | Không có gì di chuyển |
45
+ | Một mục trong danh sách bị xóa | Mục kế tiếp, hoặc tiêu đề danh sách nếu đó là mục cuối | |
46
+ | Trang tải lại sau khi gửi form | Tiêu đề trang, hoặc lỗi đầu tiên | |
47
+
48
+ - Dialog giữ focus bên trong cho tới khi đóng. Phím Escape đóng dialog.
49
+ - Không bao giờ để focus rơi về đầu trang. Nếu thành phần đang có focus biến mất, chuyển focus tới thành phần gần nhất hợp lý.
50
+
51
+ ## Phím cho từng loại control
52
+
53
+ Component Beehexa theo [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/), hướng dẫn của W3C về cách mỗi loại control hoạt động với bàn phím và trình đọc màn hình. Một nhóm control, như tab hay menu, là một điểm dừng Tab; phím mũi tên di chuyển bên trong nhóm.
54
+
55
+ | Mẫu | Phím | Trang mẫu |
56
+ | --- | --- | --- |
57
+ | Nút | <kbd>Enter</kbd> hoặc <kbd>Space</kbd> kích hoạt | [Button](https://www.w3.org/WAI/ARIA/apg/patterns/button/) |
58
+ | Link | <kbd>Enter</kbd> đi theo link | [Link](https://www.w3.org/WAI/ARIA/apg/patterns/link/) |
59
+ | Checkbox, switch | <kbd>Space</kbd> bật tắt | [Checkbox](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/), [Switch](https://www.w3.org/WAI/ARIA/apg/patterns/switch/) |
60
+ | Nhóm radio | Phím mũi tên di chuyển và chọn; Tab rời khỏi nhóm | [Radio group](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) |
61
+ | Tab | Trái và Phải chuyển giữa các tab; Home và End nhảy tới tab đầu và cuối | [Tabs](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) |
62
+ | Menu | Lên và Xuống di chuyển; Enter chọn; Escape đóng | [Menu button](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/) |
63
+ | Select, combobox | Lên và Xuống đi qua các lựa chọn; Enter chọn; Escape đóng danh sách, bấm lần nữa thì xóa chữ | [Combobox](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) |
64
+ | Dialog | Tab đi vòng bên trong; Escape đóng | [Dialog](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) |
65
+ | Disclosure, accordion | <kbd>Enter</kbd> hoặc <kbd>Space</kbd> mở và đóng | [Disclosure](https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/), [Accordion](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/) |
66
+ | Bảng dữ liệu | Tab tới các control trong dòng; tiêu đề cột sắp xếp được là một nút | [Table](https://www.w3.org/WAI/ARIA/apg/patterns/table/) |
67
+
68
+ Tab Accessibility của mỗi component, như [Button](/vi/components/button/accessibility/), liệt kê đúng các phím và mọi điểm khác so với mẫu.
69
+
70
+ ## Phím tắt
71
+
72
+ - Mọi phím tắt đều có cách khác để làm cùng việc, như một nút hay một mục menu.
73
+ - Dùng <kbd>Ctrl</kbd> hoặc <kbd>⌘</kbd> kèm một chữ cái. Phím tắt một chữ cái phải tắt được hoặc đổi được (WCAG 2.1.4).
74
+ - Không chiếm các phím mà trình duyệt và trình đọc màn hình dùng, như <kbd>Ctrl</kbd> <kbd>F</kbd> hay phím mũi tên bên ngoài một widget.
75
+ - Hiện phím tắt trong tooltip và menu, để người dùng học được.
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: Tuyên bố về khả năng tiếp cận
3
+ description: Chuẩn Beehexa theo, cách kiểm tra, các lỗi đã biết và cách báo cho chúng tôi một vấn đề.
4
+ order: 3
5
+ sidebarLabel: Tuyên bố
6
+ audience: Mọi người
7
+ updated: 2026-11-04
8
+ ---
9
+
10
+ Tuyên bố này áp dụng cho beehexa.design và các component Beehexa được mô tả trên site. Lần rà soát gần nhất là ngày 4 tháng 11 năm 2026.
11
+
12
+ Beehexa muốn mọi người đều dùng được site này và các sản phẩm xây trên nó, dù khả năng của họ thế nào và dù họ làm việc bằng cách nào: với bàn phím, trình đọc màn hình, kính lúp phần mềm hay điều khiển bằng giọng nói.
13
+
14
+ ## Chuẩn
15
+
16
+ Site này và các component Beehexa được xây theo **WCAG 2.2 mức AA**, cùng các quy tắc Beehexa chặt hơn về tương phản, focus, vùng chạm và chuyển động trong trang [Khả năng tiếp cận](/vi/foundations/guidelines/accessibility/#quy-tắc-beehexa). Sản phẩm Beehexa xây trên các component này và hướng tới cùng mức đó; mỗi team sản phẩm chịu trách nhiệm cho màn hình của mình.
17
+
18
+ Mọi chỗ trên site này chưa đạt chuẩn trên được liệt kê ở [Lỗi đã biết](#lỗi-đã-biết).
19
+
20
+ WCAG 2.2 AA cũng bao trùm các yêu cầu web của những chuẩn khác mà khách hàng hay hỏi:
21
+
22
+ | Chuẩn | Áp dụng ở đâu | Liên quan thế nào |
23
+ | --- | --- | --- |
24
+ | EN 301 549 V4.1.1 | Liên minh châu Âu, gồm cả Đạo luật Tiếp cận châu Âu (European Accessibility Act) | Yêu cầu về web và phần mềm theo WCAG 2.2 AA, cộng thêm vài điều khoản như tôn trọng cài đặt của người dùng |
25
+ | [Section 508](https://www.section508.gov/) | Mua sắm của chính phủ liên bang Mỹ | Theo WCAG 2.0 AA, vốn nằm trong WCAG 2.2 AA |
26
+
27
+ Bảng này giải thích các chuẩn liên quan với nhau thế nào. Đây không phải tuyên bố đạt EN 301 549 hay Section 508; báo cáo tuân thủ mới là tuyên bố đó.
28
+
29
+ ## Cách chúng tôi kiểm tra
30
+
31
+ - **Mỗi lần build** kiểm tương phản của mọi cặp màu chữ, icon và viền ở giao diện sáng và tối. Một cặp không đạt sẽ làm build dừng lại.
32
+ - **Mỗi thay đổi** ở một trang hay một component được kiểm bằng axe, bằng bàn phím, ở mức phóng 200% và ở độ rộng 320 px trước khi đưa lên.
33
+ - **Mỗi bản phát hành lớn** được kiểm với NVDA, JAWS, VoiceOver và TalkBack, như liệt kê trong [Kiểm thử](/vi/foundations/guidelines/accessibility/testing/#trình-đọc-màn-hình-và-trình-duyệt).
34
+
35
+ ## Lỗi đã biết
36
+
37
+ | Phạm vi | Vấn đề | Trạng thái |
38
+ | --- | --- | --- |
39
+ | Trang tiếng Việt | Trang chưa có bản tiếng Việt hiện bản tiếng Anh, được đánh dấu là tiếng Anh cho trình đọc màn hình. | Đang làm |
40
+ | Báo cáo tuân thủ | Báo cáo tuân thủ (ACR) đầu tiên, theo mẫu VPAT®, sẽ bao gồm site này và Button, và sẽ được đăng trên trang này. | Đã lên kế hoạch |
41
+ | Trình đọc màn hình | Site này và Button chưa được kiểm với NVDA, JAWS, VoiceOver hay TalkBack. | Đã lên kế hoạch |
42
+
43
+ ## Góp ý
44
+
45
+ Nếu có gì trên site này hay trong một component khó dùng với bàn phím, trình đọc màn hình, khi phóng to hay theo bất kỳ cách làm việc nào của bạn, chúng tôi muốn biết. Viết tới [hello@beehexa.com](mailto:hello@beehexa.com?subject=Accessibility%20feedback). Cho biết trang hoặc component nào, bạn đã thử gì và điều gì đã xảy ra. Vấn đề đã được xác nhận sẽ được thêm vào danh sách lỗi đã biết ở trên.
@@ -0,0 +1,58 @@
1
+ ---
2
+ title: Kiểm thử
3
+ description: Cần kiểm gì trước khi một màn hình phát hành, ai kiểm, và dùng công cụ cùng trình đọc màn hình nào.
4
+ order: 2
5
+ audience: Designer, developer
6
+ updated: 2026-11-04
7
+ ---
8
+
9
+ **Kiểm tra khả năng tiếp cận trong lúc thiết kế và xây dựng, không đợi tới cuối.** Một nhãn bị thiếu tốn một phút để sửa trong Figma, và một ngày sau khi đã phát hành.
10
+
11
+ ## Trước khi bàn giao (designer)
12
+
13
+ - **Tương phản**: chữ và icon dùng các cặp token trong [Màu sắc › Khả năng tiếp cận](/vi/foundations/styles/color/accessibility/). Tự kiểm chữ trên hình và biểu đồ.
14
+ - **Không chỉ dùng màu**: mọi trạng thái, lỗi và lựa chọn đều có chữ, icon hoặc một dấu hiệu thứ hai.
15
+ - **Thứ tự focus**: đánh số các điểm dừng Tab trên frame. Ghi rõ focus đi đâu khi dialog, drawer hay menu mở và đóng.
16
+ - **Tên gọi**: viết điều trình đọc màn hình cần đọc cho mọi nút chỉ có icon và mọi hình. Đánh dấu hình trang trí là hình trang trí.
17
+ - **Tiêu đề và landmark**: đánh dấu tiêu đề trang (một H1), tiêu đề các phần theo thứ tự, và vùng header, điều hướng và nội dung chính.
18
+ - **Trạng thái**: thiết kế đủ hover, focus, nhấn, đang chọn, vô hiệu, đang tải, trống và lỗi.
19
+ - **Kích thước**: control ít nhất 24 px; trên màn hình cảm ứng, vùng chạm ít nhất 44 px.
20
+ - **Chữ**: kiểm chuỗi tiếng Việt dài, cỡ chữ 200% và độ rộng 320 px.
21
+
22
+ ## Trước khi merge (developer)
23
+
24
+ - **Kiểm tự động**: chạy axe (tiện ích trình duyệt hoặc test runner) trên mọi màn hình mới. Không có lỗi nào ở WCAG 2.2 AA.
25
+ - **Bàn phím**: cất chuột đi. Tới và dùng được mọi control bằng Tab, Shift Tab, phím mũi tên, Enter, Space và Escape. Focus ring luôn nhìn thấy và không bao giờ bị mất.
26
+ - **Phóng to**: ở mức phóng 200% của trình duyệt và ở độ rộng 320 px, không có gì bị cắt và không có gì cuộn ngang, trừ bảng và code.
27
+ - **Giao diện và chuyển động**: kiểm giao diện sáng, tối và giảm chuyển động.
28
+ - **Trình đọc màn hình**: đi hết thao tác chính bằng một trình đọc màn hình trong danh sách dưới đây. Mọi control đọc lên tên, vai trò và trạng thái; các thay đổi như "Đã lưu" được đọc lên.
29
+ - **Ngôn ngữ**: trang có `lang` đúng; giọng đọc tiếng Việt đọc chữ tiếng Việt đúng thanh điệu.
30
+
31
+ ## Trình đọc màn hình và trình duyệt
32
+
33
+ Kiểm với ít nhất một cặp trên nền tảng mà người dùng của bạn dùng nhiều nhất. Trước một bản phát hành lớn, kiểm tất cả.
34
+
35
+ | Trình đọc màn hình | Trình duyệt | Nền tảng |
36
+ | --- | --- | --- |
37
+ | NVDA | Firefox hoặc Chrome | Windows |
38
+ | JAWS | Chrome | Windows |
39
+ | VoiceOver | Safari | macOS |
40
+ | VoiceOver | Safari | iOS |
41
+ | TalkBack | Chrome | Android |
42
+
43
+ ## Công cụ
44
+
45
+ | Công cụ | Dùng để |
46
+ | --- | --- |
47
+ | axe DevTools hoặc axe test runner | Kiểm WCAG tự động trên một trang hoặc trong test |
48
+ | Công cụ dành cho nhà phát triển của trình duyệt | Xem cây accessibility, đo tương phản, giả lập giảm chuyển động và giao diện tối |
49
+ | Accessibility Insights | Kiểm có hướng dẫn cho bàn phím và các điểm dừng Tab |
50
+ | Một công cụ đo tương phản màu | Chữ trên hình, biểu đồ và mọi thứ ngoài các cặp token |
51
+
52
+ ## Với con người
53
+
54
+ Công cụ không cho bạn biết một thao tác có dễ hay không. Hãy nhờ những người dùng trình đọc màn hình, kính lúp phần mềm hoặc bàn phím thử các thao tác chính của sản phẩm, và sửa trước những gì làm họ chậm lại.
55
+
56
+ ## Báo một vấn đề
57
+
58
+ Bạn thấy vấn đề trong một component Beehexa hay trên site này? Dùng link góp ý ở cuối trang, hoặc viết tới [hello@beehexa.com](mailto:hello@beehexa.com?subject=Accessibility%20feedback). Vấn đề đã được xác nhận sẽ nằm trong danh sách [lỗi đã biết](/vi/foundations/guidelines/accessibility/statement/#lỗi-đã-biết) cho tới khi được sửa.
@@ -0,0 +1,108 @@
1
+ ---
2
+ title: Khả năng tiếp cận
3
+ description: Sản phẩm dễ tiếp cận phục vụ được nhiều người hơn, trong nhiều hoàn cảnh hơn. Tìm hiểu cách thiết kế, xây dựng và viết nội dung cho chúng cùng Beehexa.
4
+ order: 1
5
+ sidebarLabel: Tổng quan
6
+ audience: Designer, developer, người viết nội dung
7
+ updated: 2026-11-04
8
+ ---
9
+
10
+ Hãy hình dung những người dùng HexaSync trong một ngày bình thường. Một chủ cửa hàng xem lại đơn hàng đêm qua bằng trình đọc màn hình. Một developer sửa lỗi đồng bộ chỉ bằng bàn phím. Một kế toán đọc dashboard trên điện thoại dưới nắng, bằng ngôn ngữ thứ hai của cô ấy.
11
+
12
+ Ai trong số họ cũng phải làm xong được việc của mình. Khi họ làm được, sản phẩm cũng rõ ràng và nhanh hơn với tất cả những người còn lại.
13
+
14
+ ## Beehexa giúp gì
15
+
16
+ Component Beehexa và site này đạt [WCAG 2.2](https://www.w3.org/TR/WCAG22/) mức AA, chuẩn quốc tế về nội dung web dễ tiếp cận. Ở bốn chỗ quan trọng nhất, Beehexa yêu cầu cao hơn: đó là các [quy tắc Beehexa](#quy-tắc-beehexa) bên dưới.
17
+
18
+ Bắt đầu từ component là phần lớn việc đã được làm sẵn: màu đủ tương phản, focus ring luôn nhìn thấy, vùng bấm đủ lớn để chạm, và cách dùng bàn phím theo [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/). Tab Accessibility của mỗi component cho biết các phím và phần việc còn lại của team bạn.
19
+
20
+ Điều component không quyết định được là một màn hình ghép lại thế nào và nói gì. Phần đó là của bạn, và trang này chỉ cách làm. [Tuyên bố về khả năng tiếp cận](/vi/foundations/guidelines/accessibility/statement/) liệt kê các chuẩn chúng tôi theo, các lỗi đã biết và cách báo một vấn đề.
21
+
22
+ ## Chúng ta thiết kế cho ai
23
+
24
+ Khuyết tật không chỉ là điều người ta sống chung nhiều năm. Một cổ tay gãy kéo dài sáu tuần. Một kho hàng ồn ào át mọi âm thanh. Nắng chiếu lên điện thoại làm màu nhạt đi. Hãy thiết kế cho cả dải đó, và cùng một màn hình sẽ dùng được cho tất cả.
25
+
26
+ | Nhu cầu | Lâu dài | Tạm thời | Theo hoàn cảnh | Điều giúp được |
27
+ | --- | --- | --- | --- | --- |
28
+ | Nhìn | Mù, thị lực kém, mù màu | Mỏi mắt, đau nửa đầu | Nắng chiếu lên màn hình, điện thoại nhỏ | Tương phản mạnh, chữ hoặc icon đi kèm mọi màu, alt text, phóng to mà bố cục không vỡ |
29
+ | Nghe | Điếc, nghe kém | Viêm tai | Văn phòng hay kho hàng ồn, không có tai nghe | Phụ đề và bản chép lời, thông báo nhìn thấy được cho mọi âm thanh |
30
+ | Vận động | Tay hạn chế cử động, run tay | Gãy cổ tay | Cầm điện thoại một tay, đang đi xe | Dùng được bằng bàn phím, vùng bấm lớn, không giới hạn thời gian, không có thao tác chỉ kéo thả mới làm được |
31
+ | Suy nghĩ và tập trung | Khó đọc, ADHD, giảm trí nhớ | Căng thẳng, mệt mỏi, tác dụng phụ của thuốc | Bị cắt ngang, làm việc bằng ngôn ngữ thứ hai | Lời dễ hiểu, các bước ngắn, tiêu đề rõ, thông báo lỗi nói cách sửa, cảnh báo trước thay đổi lớn |
32
+
33
+ ## Nguyên tắc
34
+
35
+ **Bắt đầu từ component Beehexa.** Tương phản, focus, vùng bấm và bàn phím đã có sẵn. Control tự làm phải tự làm hết những thứ đó, nên chỉ làm khi không có component nào phù hợp.
36
+
37
+ **Làm cho mọi thứ dùng được bằng bàn phím.** Có người không dùng chuột được. Chuột làm được gì thì bàn phím cũng làm được, theo thứ tự người ta đọc. [Bàn phím và focus](/vi/foundations/guidelines/accessibility/keyboard-and-focus/) chỉ cách làm.
38
+
39
+ **Không bao giờ chỉ dựa vào màu.** Cứ khoảng 12 người đàn ông thì có 1 người không phân biệt được một số màu. Chữ "Thất bại" màu đỏ thì ai cũng hiểu; một chấm đỏ đứng một mình thì không.
40
+
41
+ **Đặt tên rõ cho mọi control.** Dùng nhãn nhìn thấy được. Nút chỉ có icon cần một cái tên để trình đọc màn hình đọc lên, như "Xóa cửa hàng", không phải "Thùng rác".
42
+
43
+ **Viết dễ hiểu, bằng tiếng Việt và tiếng Anh.** Câu ngắn, từ ngữ thường ngày, mỗi lần một ý. Nhiều người đọc sản phẩm bằng ngôn ngữ thứ hai, nên tránh thành ngữ và tiếng lóng, và giải thích thuật ngữ ở lần đầu nó xuất hiện. Xem [Nội dung](/vi/foundations/guidelines/content/).
44
+
45
+ **Để người dùng chỉnh màn hình theo cách của họ.** Người ta phóng to, chuyển sang giao diện tối và tắt chuyển động. Trang vẫn dùng được ở mức phóng 200% và ở độ rộng 320 px mà không phải cuộn ngang, ở giao diện sáng lẫn tối, khi đã tắt chuyển động.
46
+
47
+ **Dùng đúng thẻ trong code.** Nút là `<button>`, link là `<a>`, tiêu đề đi từ `<h1>` tới `<h4>` theo thứ tự. Người dùng trình đọc màn hình di chuyển theo tiêu đề và landmark (`header`, `nav`, `main`, `footer`); một `div` chỉ trông giống những thứ đó thì họ không thấy.
48
+
49
+ **Cảnh báo trước thay đổi lớn.** Xóa một cửa hàng, dừng đồng bộ hay gửi dữ liệu sang hệ thống khác không phải lúc nào cũng hoàn tác được. Nói rõ điều gì sẽ xảy ra và hỏi người dùng xác nhận, hoặc cho họ hoàn tác. Không có thay đổi quan trọng nào xảy ra chỉ vì focus di chuyển hay người dùng còn đang gõ.
50
+
51
+ **Kiểm tra bằng công cụ và bằng con người.** Công cụ tự động tìm được một phần lỗi. Bàn phím, trình đọc màn hình và những người dùng chúng mỗi ngày tìm ra phần còn lại. [Kiểm thử](/vi/foundations/guidelines/accessibility/testing/) chỉ cách làm.
52
+
53
+ ## Quy tắc Beehexa
54
+
55
+ WCAG 2.2 AA là điểm bắt đầu. Ở bốn chỗ, Beehexa yêu cầu cao hơn, vì đây là những vấn đề người dùng gặp nhiều nhất.
56
+
57
+ | Quy tắc | Beehexa yêu cầu | Vì sao | Dựa trên |
58
+ | --- | --- | --- | --- |
59
+ | Tương phản | Chữ ít nhất 4.5:1; chữ lớn và thành phần giao diện ít nhất 3:1. Chữ người ta đọc trọn, như chữ nội dung, nhãn và link, ít nhất 7:1: dùng `color.text`, `color.text.subtle` hoặc màu link. `color.text.subtlest` (4.5:1) chỉ dành cho chữ phụ ngắn như thời gian và gợi ý. | Đọc chữ dài mà nhạt rất mỏi mắt, nhất là trên điện thoại ngoài trời | WCAG 1.4.3, 1.4.11; 1.4.6 cho chữ nội dung |
60
+ | Focus | Luôn nhìn thấy: viền 2 px màu `color.border.focus`, cách thành phần 2 px (`border.width.focused`, `state.focus.offset`). | Người dùng bàn phím cần biết mình đang ở đâu sau mỗi bước | WCAG 2.4.7; 2.4.13 |
61
+ | Vùng bấm | Ít nhất 24 × 24 px khi dùng chuột. Trên màn hình cảm ứng, ít nhất 44 × 44 px (`size.target.touch`). Xem [Kích thước và mật độ](/vi/foundations/styles/size-and-density/#vùng-bấm). | Đầu ngón tay kém chính xác hơn con trỏ | WCAG 2.5.8; 2.5.5 trên màn hình cảm ứng |
62
+ | Chuyển động | Khi người dùng bật giảm chuyển động, các chuyển động không cần thiết dừng lại. Xem [Chuyển động](/vi/foundations/styles/motion/). | Chuyển động có thể làm một số người chóng mặt hoặc buồn nôn | WCAG 2.3.3 |
63
+
64
+ ## Hình ảnh, video và âm thanh
65
+
66
+ Người không nhìn hoặc không nghe được một nội dung cần nhận cùng thông tin đó ở dạng khác.
67
+
68
+ | Nội dung | Làm |
69
+ | --- | --- |
70
+ | Hình mang thông tin | Alt text nói hình cho biết điều gì, không tả hình trông thế nào: "Đồng bộ thất bại ở 3 trên 12 cửa hàng", không phải "Biểu đồ". |
71
+ | Hình trang trí, hoặc icon cạnh nhãn của chính nó | Alt rỗng (`alt=""`) hoặc `aria-hidden="true"`, để không bị đọc hai lần. |
72
+ | Nút chỉ có icon | Một cái tên nói thao tác, như "Xóa cửa hàng". |
73
+ | Biểu đồ | Một đoạn tóm tắt bằng chữ, và dữ liệu dạng bảng. |
74
+ | Video | Phụ đề, và bản chép lời bên cạnh. Không tự phát kèm âm thanh. |
75
+ | Âm thanh hoặc tiếng báo | Bản chép lời, và một thông báo nhìn thấy được cho mỗi âm thanh. |
76
+ | Chữ trong hình | Tránh. Dùng chữ thật, để người ta phóng to, dịch và nghe đọc được. |
77
+
78
+ ## Ai làm gì
79
+
80
+ | Beehexa cho bạn | Team bạn làm |
81
+ | --- | --- |
82
+ | Các cặp màu đạt tương phản ở giao diện sáng và tối | Dùng đúng các cặp đã liệt kê; tự kiểm chữ trên hình và biểu đồ |
83
+ | Component có bàn phím, focus ring và vai trò đúng cho trình đọc màn hình | Sắp chúng theo thứ tự hợp lý và giữ focus ở chỗ người dùng chờ đợi |
84
+ | Focus ring 2 px và vùng chạm 44 px | Giữ ring luôn hiện và vùng bấm đủ cỡ |
85
+ | Kiểu nhãn và kiểu lỗi | Viết nhãn, thông báo lỗi và alt text |
86
+ | Hỗ trợ giao diện sáng, tối và giảm chuyển động | Tự kiểm màn hình của mình ở từng chế độ |
87
+
88
+ ## Trước khi phát hành
89
+
90
+ Hỏi những câu này với mỗi màn hình. [Kiểm thử](/vi/foundations/guidelines/accessibility/testing/) chỉ cách kiểm từng câu.
91
+
92
+ - Bạn có đọc được mọi chữ, và thấy mọi icon và viền, ở giao diện sáng lẫn tối không?
93
+ - Bạn có làm được mọi việc chỉ bằng bàn phím, theo thứ tự hợp lý không?
94
+ - Bạn có luôn thấy focus của bàn phím đang ở đâu, kể cả cạnh header dính hay drawer đang mở không?
95
+ - Trên điện thoại, mọi control có dễ chạm không?
96
+ - Mọi control và mọi hình mang thông tin có nói nó là gì không?
97
+ - Trạng thái và lỗi có dùng chữ, không chỉ dùng màu, và lỗi có nói cách sửa không?
98
+ - Tiêu đề có đi theo thứ tự, và trang có header, điều hướng, nội dung chính và footer không?
99
+ - Trang có dùng được ở độ rộng 320 px và phóng 200% mà không phải cuộn ngang không?
100
+ - Chuyển động có dừng khi bật giảm chuyển động không?
101
+ - Xóa, ngắt kết nối và gửi dữ liệu có hỏi trước, hoặc có hoàn tác được không?
102
+ - Ngôn ngữ của trang đã đặt chưa (`lang="vi"` hoặc `lang="en"`), và đoạn bằng ngôn ngữ kia đã được đánh dấu chưa?
103
+
104
+ ## Trong mục này
105
+
106
+ - [Bàn phím và focus](/vi/foundations/guidelines/accessibility/keyboard-and-focus/): focus di chuyển theo thứ tự nào, focus ring trông thế nào, và mỗi loại component dùng phím gì.
107
+ - [Kiểm thử](/vi/foundations/guidelines/accessibility/testing/): cần kiểm gì trước khi một màn hình phát hành, ai kiểm, và bằng công cụ nào.
108
+ - [Tuyên bố về khả năng tiếp cận](/vi/foundations/guidelines/accessibility/statement/): các chuẩn chúng tôi theo, các lỗi đã biết và cách báo một vấn đề.
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: Nội dung
3
+ description: Chữ là phần lớn của giao diện. Viết nội dung sản phẩm rõ ràng, ngắn gọn và thống nhất ở mọi nơi, bằng tiếng Anh và tiếng Việt.
4
+ order: 2
5
+ ---
6
+
7
+ Người dùng không đọc giao diện; họ lướt tìm việc cần làm tiếp theo. Mỗi nhãn, thông báo và trạng thái trống hoặc giúp họ làm việc đó, hoặc làm họ chậm lại.
8
+
9
+ ## Giọng văn
10
+
11
+ Rõ ràng, thẳng thắn và hữu ích. Viết cho những người bận rộn quản lý dữ liệu trên nhiều hệ thống: nói điều gì vừa xảy ra và cần làm gì tiếp, bằng ít chữ nhất có thể.
12
+
13
+ ## Quy tắc
14
+
15
+ - Chỉ viết hoa chữ đầu câu cho nhãn, tiêu đề và nút.
16
+ - Bắt đầu nút bằng động từ: "Lưu", "Đồng bộ đơn hàng", "Xóa tích hợp".
17
+ - Mỗi thứ chỉ có một tên trong cả sản phẩm.
18
+ - Viết số bằng chữ số: "3 đơn hàng thất bại".
19
+ - Tránh thuật ngữ, trừ khi người đọc của bạn dùng nó.
20
+ - Viết dễ hiểu: câu ngắn, từ ngữ thường ngày, mỗi lần một ý. Nhiều người đọc sản phẩm bằng ngôn ngữ thứ hai.
21
+ - Viết mọi trạng thái bằng chữ. Màu và icon hỗ trợ chữ; không bao giờ thay cho chữ.
22
+
23
+ ## Thông báo
24
+
25
+ | Loại | Viết |
26
+ | --- | --- |
27
+ | Lỗi | Điều gì đã xảy ra, vì sao, và cách sửa. |
28
+ | Trạng thái trống | Thứ gì sẽ hiện ở đây và cách thêm mục đầu tiên. |
29
+ | Xác nhận | Thao tác và hệ quả của nó: "Xóa 3 đơn hàng? Không thể hoàn tác." |
30
+
31
+ ## Liên quan
32
+
33
+ - [Khả năng tiếp cận](/vi/foundations/guidelines/accessibility/): tên cho control, alt text và lời dễ hiểu.
34
+ - [Cách dùng chữ](/vi/foundations/styles/typography/usage/): text style, cách viết hoa và chữ dài.
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: Nền tảng
3
+ description: Những quyết định chung đứng sau mọi màn hình Beehexa. Học một lần, sản phẩm nào cũng thấy quen.
4
+ order: 0
5
+ ---
6
+
7
+ Nền tảng là những quyết định mà mọi màn hình Beehexa dùng chung: màu sắc, chữ, khoảng cách, hình khối và chuyển động mà người dùng nhìn thấy, cùng các hướng dẫn giúp sản phẩm rõ ràng và dễ tiếp cận. Vì sản phẩm nào cũng bắt đầu từ cùng một nền tảng, ai đã quen một sản phẩm Beehexa sẽ thấy quen ngay ở sản phẩm tiếp theo.
8
+
9
+ Nền tảng gồm ba nhóm. **Design token** giữ các giá trị. **Hướng dẫn** nói về cách người dùng đọc và dùng một màn hình. **Kiểu dáng** giải thích từng yếu tố thị giác và khi nào dùng nó.
@@ -1,14 +1,20 @@
1
1
  ---
2
2
  title: Viền
3
- description: Bốn độ dày viền, màu đi cùng mỗi độ dày, và cách vẽ focus ring.
3
+ description: "Viền để tách và vẽ đường bao. Phần lớn viền là 1 px; viền dày hơn nghĩa là đang chọn, đang focus hoặc một trạng thái cần chú ý."
4
4
  order: 7
5
5
  ---
6
6
  import ShapeDemo from '../../../components/ShapeDemo.astro';
7
7
  import TokenTable from '../../../components/TokenTable.astro';
8
8
 
9
+ Viền vẽ ra những mép mà người dùng dựa vào: ô nhập bắt đầu ở đâu, card này hết ở đâu và card kia bắt đầu, bàn phím đang ở chỗ nào.
10
+
9
11
  **Phần lớn viền là 1 px. Viền dày hơn mang ý nghĩa: đang chọn, đang focus, hoặc một trạng thái cần chú ý.**
10
12
 
11
- Màu viền là token màu: `color.border` cho đường phân cách và card, `color.border.bold` cho mép ô nhập, checkbox và select. Xem [Token](/vi/foundations/styles/color/tokens/#borders).
13
+ Màu viền là token màu: `color.border` cho đường phân cách và card, `color.border.bold` cho mép ô nhập, checkbox và select. Xem [Token](/vi/foundations/styles/color/tokens/#viền).
14
+
15
+ Card tương tác có viền phải giữ khung khi hover: tăng lên `color.border.bold`
16
+ và thêm `elevation.shadow.raised`, không làm trong suốt hay mờ viền. Focus bàn
17
+ phím thêm ring chuẩn mà không bỏ khung. Card và callout dùng `radius.100` (8 px).
12
18
 
13
19
  ## Các độ dày
14
20
 
@@ -85,5 +91,5 @@ Không báo trạng thái chỉ bằng màu. Đang chọn và đang focus còn
85
91
 
86
92
  ## Liên quan
87
93
 
88
- - [Bo góc](/vi/foundations/styles/radius/): các bậc bo góc và quy tắc lồng nhau.
94
+ - [Bo góc](/vi/foundations/styles/radius/): các bậc theo vai trò và hình học chức năng.
89
95
  - [Trạng thái tương tác](/vi/foundations/styles/interaction-states/): hover, nhấn, đang chọn và vô hiệu.