@beehexa/design-rules 2611.3.3 → 2611.5.2

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 (171) hide show
  1. package/README.md +1 -1
  2. package/dist/AGENTS.md +1 -7
  3. package/dist/catalog.json +703 -321
  4. package/dist/docs/public/_redirects +2 -0
  5. package/dist/docs/scripts/color-pairs.mjs +5 -1
  6. package/dist/docs/scripts/token-utils.d.mts +5 -1
  7. package/dist/docs/scripts/token-utils.mjs +44 -4
  8. package/dist/docs/src/brand/structure-proposal.md +1 -1
  9. package/dist/docs/src/components/ColorDemo.astro +56 -18
  10. package/dist/docs/src/components/ElevationDemo.astro +196 -0
  11. package/dist/docs/src/components/LayoutDemo.astro +1 -1
  12. package/dist/docs/src/components/MotionDemo.astro +135 -0
  13. package/dist/docs/src/components/NativeControlsDemo.astro +279 -0
  14. package/dist/docs/src/components/OpacityDemo.astro +95 -0
  15. package/dist/docs/src/components/RoleGuides.astro +2 -2
  16. package/dist/docs/src/components/ShapeDemo.astro +88 -44
  17. package/dist/docs/src/components/ShapePin.astro +5 -3
  18. package/dist/docs/src/components/SiteHeader.astro +19 -4
  19. package/dist/docs/src/components/SystemAreas.astro +1 -1
  20. package/dist/docs/src/components/TokenTable.astro +16 -1
  21. package/dist/docs/src/components/TypeDemo.astro +15 -15
  22. package/dist/docs/src/components/ZIndexDemo.astro +102 -0
  23. package/dist/docs/src/components/logos/LogoInUse.astro +3 -3
  24. package/dist/docs/src/content/components/button/accessibility.mdx +41 -8
  25. package/dist/docs/src/content/components/button/code.mdx +8 -1
  26. package/dist/docs/src/content/components/button/examples.mdx +23 -4
  27. package/dist/docs/src/content/components/button/usage.mdx +26 -0
  28. package/dist/docs/src/content/components/resizable-panel/accessibility.mdx +61 -0
  29. package/dist/docs/src/content/components/resizable-panel/changelog.mdx +20 -0
  30. package/dist/docs/src/content/components/resizable-panel/code.mdx +79 -0
  31. package/dist/docs/src/content/components/resizable-panel/examples.mdx +85 -0
  32. package/dist/docs/src/content/components/resizable-panel/meta.json +5 -0
  33. package/dist/docs/src/content/components/resizable-panel/usage.mdx +101 -0
  34. package/dist/docs/src/content/foundations/guidelines/accessibility/keyboard-and-focus.mdx +75 -0
  35. package/dist/docs/src/content/foundations/guidelines/accessibility/statement.mdx +45 -0
  36. package/dist/docs/src/content/foundations/guidelines/accessibility/testing.mdx +58 -0
  37. package/dist/docs/src/content/foundations/guidelines/accessibility.mdx +100 -11
  38. package/dist/docs/src/content/foundations/guidelines/content.mdx +11 -2
  39. package/dist/docs/src/content/foundations/index.mdx +3 -3
  40. package/dist/docs/src/content/foundations/styles/border.mdx +13 -6
  41. package/dist/docs/src/content/foundations/styles/color/accessibility.mdx +4 -2
  42. package/dist/docs/src/content/foundations/styles/color/dark-mode.mdx +2 -2
  43. package/dist/docs/src/content/foundations/styles/color/index.mdx +14 -2
  44. package/dist/docs/src/content/foundations/styles/color/palette.mdx +4 -4
  45. package/dist/docs/src/content/foundations/styles/color/tokens.mdx +2 -2
  46. package/dist/docs/src/content/foundations/styles/color/usage.mdx +34 -5
  47. package/dist/docs/src/content/foundations/styles/data-visualization.mdx +150 -6
  48. package/dist/docs/src/content/foundations/styles/elevation.mdx +72 -3
  49. package/dist/docs/src/content/foundations/styles/icons/accessibility.mdx +1 -1
  50. package/dist/docs/src/content/foundations/styles/icons/code.mdx +6 -18
  51. package/dist/docs/src/content/foundations/styles/icons/index.mdx +2 -2
  52. package/dist/docs/src/content/foundations/styles/icons/usage.mdx +13 -8
  53. package/dist/docs/src/content/foundations/styles/interaction-states.mdx +82 -9
  54. package/dist/docs/src/content/foundations/styles/layout/app-frame.mdx +12 -4
  55. package/dist/docs/src/content/foundations/styles/layout/breakpoints.mdx +10 -7
  56. package/dist/docs/src/content/foundations/styles/layout/grid.mdx +4 -2
  57. package/dist/docs/src/content/foundations/styles/layout/index.mdx +3 -3
  58. package/dist/docs/src/content/foundations/styles/layout/overlays.mdx +28 -37
  59. package/dist/docs/src/content/foundations/styles/layout/page-widths.mdx +4 -4
  60. package/dist/docs/src/content/foundations/styles/logos/downloads-and-terms.mdx +7 -7
  61. package/dist/docs/src/content/foundations/styles/logos/index.mdx +13 -2
  62. package/dist/docs/src/content/foundations/styles/logos/placement-and-containers.mdx +4 -2
  63. package/dist/docs/src/content/foundations/styles/logos/product-logos.mdx +2 -2
  64. package/dist/docs/src/content/foundations/styles/logos/using-the-logo.mdx +3 -1
  65. package/dist/docs/src/content/foundations/styles/motion.mdx +131 -3
  66. package/dist/docs/src/content/foundations/styles/opacity.mdx +49 -5
  67. package/dist/docs/src/content/foundations/styles/radius.mdx +63 -15
  68. package/dist/docs/src/content/foundations/styles/scrollbars.mdx +176 -0
  69. package/dist/docs/src/content/foundations/styles/size-and-density.mdx +23 -6
  70. package/dist/docs/src/content/foundations/styles/spacing.mdx +17 -3
  71. package/dist/docs/src/content/foundations/styles/typography/code.mdx +5 -3
  72. package/dist/docs/src/content/foundations/styles/typography/index.mdx +13 -3
  73. package/dist/docs/src/content/foundations/styles/typography/usage.mdx +5 -3
  74. package/dist/docs/src/content/foundations/styles/typography/vietnamese.mdx +2 -2
  75. package/dist/docs/src/content/foundations/styles/z-index.mdx +67 -5
  76. package/dist/docs/src/content/foundations/tokens/all-tokens.mdx +11 -0
  77. package/dist/docs/src/content/foundations/tokens/index.mdx +17 -9
  78. package/dist/docs/src/content/get-started/design.mdx +1 -1
  79. package/dist/docs/src/content/get-started/develop.mdx +2 -6
  80. package/dist/docs/src/content/get-started/index.mdx +1 -1
  81. package/dist/docs/src/content/release-phases/index.mdx +1 -1
  82. package/dist/docs/src/content/tools/ant-design-vue-theme.mdx +571 -19
  83. package/dist/docs/src/content/tools/application-content.mdx +176 -0
  84. package/dist/docs/src/content/tools/editors.mdx +271 -0
  85. package/dist/docs/src/content/tools/eslint.mdx +1 -1
  86. package/dist/docs/src/content/tools/index.mdx +2 -2
  87. package/dist/docs/src/content/tools/mermaid.mdx +190 -0
  88. package/dist/docs/src/content/tools/vueflow.mdx +179 -0
  89. package/dist/docs/src/content-vi/foundations/guidelines/accessibility/keyboard-and-focus.mdx +75 -0
  90. package/dist/docs/src/content-vi/foundations/guidelines/accessibility/statement.mdx +45 -0
  91. package/dist/docs/src/content-vi/foundations/guidelines/accessibility/testing.mdx +58 -0
  92. package/dist/docs/src/content-vi/foundations/guidelines/accessibility.mdx +108 -0
  93. package/dist/docs/src/content-vi/foundations/guidelines/content.mdx +34 -0
  94. package/dist/docs/src/content-vi/foundations/index.mdx +9 -0
  95. package/dist/docs/src/content-vi/foundations/styles/border.mdx +12 -6
  96. package/dist/docs/src/content-vi/foundations/styles/color/accessibility.mdx +4 -2
  97. package/dist/docs/src/content-vi/foundations/styles/color/dark-mode.mdx +2 -2
  98. package/dist/docs/src/content-vi/foundations/styles/color/index.mdx +14 -2
  99. package/dist/docs/src/content-vi/foundations/styles/color/palette.mdx +5 -5
  100. package/dist/docs/src/content-vi/foundations/styles/color/tokens.mdx +2 -2
  101. package/dist/docs/src/content-vi/foundations/styles/color/usage.mdx +34 -5
  102. package/dist/docs/src/content-vi/foundations/styles/data-visualization.mdx +75 -6
  103. package/dist/docs/src/content-vi/foundations/styles/elevation.mdx +81 -0
  104. package/dist/docs/src/content-vi/foundations/styles/icons/accessibility.mdx +1 -1
  105. package/dist/docs/src/content-vi/foundations/styles/icons/code.mdx +6 -18
  106. package/dist/docs/src/content-vi/foundations/styles/icons/index.mdx +2 -2
  107. package/dist/docs/src/content-vi/foundations/styles/icons/usage.mdx +13 -8
  108. package/dist/docs/src/content-vi/foundations/styles/interaction-states.mdx +22 -8
  109. package/dist/docs/src/content-vi/foundations/styles/layout/app-frame.mdx +13 -1
  110. package/dist/docs/src/content-vi/foundations/styles/layout/breakpoints.mdx +10 -7
  111. package/dist/docs/src/content-vi/foundations/styles/layout/grid.mdx +4 -2
  112. package/dist/docs/src/content-vi/foundations/styles/layout/index.mdx +3 -3
  113. package/dist/docs/src/content-vi/foundations/styles/layout/overlays.mdx +36 -0
  114. package/dist/docs/src/content-vi/foundations/styles/layout/page-widths.mdx +5 -1
  115. package/dist/docs/src/content-vi/foundations/styles/logos/downloads-and-terms.mdx +7 -7
  116. package/dist/docs/src/content-vi/foundations/styles/logos/index.mdx +13 -2
  117. package/dist/docs/src/content-vi/foundations/styles/logos/placement-and-containers.mdx +4 -2
  118. package/dist/docs/src/content-vi/foundations/styles/logos/product-logos.mdx +2 -2
  119. package/dist/docs/src/content-vi/foundations/styles/logos/using-the-logo.mdx +3 -1
  120. package/dist/docs/src/content-vi/foundations/styles/motion.mdx +139 -0
  121. package/dist/docs/src/content-vi/foundations/styles/opacity.mdx +49 -5
  122. package/dist/docs/src/content-vi/foundations/styles/radius.mdx +63 -15
  123. package/dist/docs/src/content-vi/foundations/styles/size-and-density.mdx +23 -6
  124. package/dist/docs/src/content-vi/foundations/styles/spacing.mdx +17 -3
  125. package/dist/docs/src/content-vi/foundations/styles/typography/code.mdx +5 -3
  126. package/dist/docs/src/content-vi/foundations/styles/typography/index.mdx +14 -4
  127. package/dist/docs/src/content-vi/foundations/styles/typography/usage.mdx +4 -2
  128. package/dist/docs/src/content-vi/foundations/styles/typography/vietnamese.mdx +2 -2
  129. package/dist/docs/src/content-vi/foundations/styles/z-index.mdx +67 -5
  130. package/dist/docs/src/content-vi/foundations/tokens/all-tokens.mdx +47 -0
  131. package/dist/docs/src/content-vi/foundations/tokens/index.mdx +35 -0
  132. package/dist/docs/src/lib/i18n.ts +0 -1
  133. package/dist/docs/src/lib/token-descriptions-vi.ts +81 -14
  134. package/dist/docs/src/lib/tokens.ts +3 -0
  135. package/dist/docs/src/styles/chrome.css +21 -14
  136. package/dist/docs/src/styles/color.css +50 -53
  137. package/dist/docs/src/styles/docs.css +37 -55
  138. package/dist/docs/src/styles/elevation.css +83 -0
  139. package/dist/docs/src/styles/global.css +21 -10
  140. package/dist/docs/src/styles/icons.css +20 -23
  141. package/dist/docs/src/styles/kit.css +116 -0
  142. package/dist/docs/src/styles/layout.css +8 -13
  143. package/dist/docs/src/styles/motion.css +34 -0
  144. package/dist/docs/src/styles/opacity.css +43 -0
  145. package/dist/docs/src/styles/scrollbars.css +74 -0
  146. package/dist/docs/src/styles/shapes.css +35 -29
  147. package/dist/docs/src/styles/tokens.css +1663 -4
  148. package/dist/docs/src/styles/tokens.js +538 -4
  149. package/dist/docs/src/styles/typography.css +8 -11
  150. package/dist/docs/src/styles/zindex.css +59 -0
  151. package/dist/docs/tokens/border.json +1 -1
  152. package/dist/docs/tokens/color.json +75 -4
  153. package/dist/docs/tokens/content.json +24 -0
  154. package/dist/docs/tokens/diagram.json +54 -0
  155. package/dist/docs/tokens/editor.json +129 -0
  156. package/dist/docs/tokens/elevation.json +15 -5
  157. package/dist/docs/tokens/flow.json +497 -0
  158. package/dist/docs/tokens/layout.json +4 -0
  159. package/dist/docs/tokens/motion.json +37 -5
  160. package/dist/docs/tokens/opacity.json +9 -0
  161. package/dist/docs/tokens/radius.json +52 -8
  162. package/dist/docs/tokens/resize.json +79 -0
  163. package/dist/docs/tokens/scrollbar.json +40 -0
  164. package/dist/docs/tokens/size.json +7 -1
  165. package/dist/docs/tokens/spacing.json +35 -5
  166. package/dist/docs/tokens/switch.json +280 -0
  167. package/dist/docs/tokens/typography.json +5 -0
  168. package/dist/docs/tokens/visualization.json +123 -0
  169. package/dist/docs/tokens/z-index.json +49 -0
  170. package/dist/index.js +703 -321
  171. package/package.json +1 -1
@@ -0,0 +1,58 @@
1
+ ---
2
+ title: Testing
3
+ description: What to check before a screen ships, who checks it, and which tools and screen readers to use.
4
+ order: 2
5
+ audience: Designers, developers
6
+ updated: 2026-11-04
7
+ ---
8
+
9
+ **Check accessibility while you design and build, not at the end.** A missing label costs a minute in Figma and a day after release.
10
+
11
+ ## Before handoff (designers)
12
+
13
+ - **Contrast**: text and icons use the token pairs listed in [Color › Accessibility](/foundations/styles/color/accessibility/). Check text on images and charts by hand.
14
+ - **Colour alone**: every status, error and selection has a word, an icon or a second cue.
15
+ - **Focus order**: number the Tab stops on the frame. Mark where focus goes when a dialog, drawer or menu opens and closes.
16
+ - **Names**: write what a screen reader should say for every icon button and image. Mark decorative images as decorative.
17
+ - **Headings and landmarks**: mark the page title (one H1), section headings in order, and the header, navigation and main areas.
18
+ - **States**: design hover, focus, pressed, selected, disabled, loading, empty and error.
19
+ - **Sizes**: controls are at least 24 px; on touch screens, at least 44 px to tap.
20
+ - **Text**: check long Vietnamese strings, 200% text size and the 320 px width.
21
+
22
+ ## Before merge (developers)
23
+
24
+ - **Automated check**: run axe (browser extension or the test runner) on every new screen. Zero violations at WCAG 2.2 AA.
25
+ - **Keyboard**: put the mouse away. Reach and use every control with Tab, Shift Tab, the arrow keys, Enter, Space and Escape. The focus ring is always visible and never lost.
26
+ - **Zoom**: at 200% browser zoom and at 320 px wide, nothing is cut off and nothing scrolls sideways except tables and code.
27
+ - **Themes and motion**: check light, dark and reduced motion.
28
+ - **Screen reader**: go through the main task with one screen reader from the list below. Every control says its name, role and state; changes such as "Saved" are announced.
29
+ - **Language**: the page has the right `lang`; a Vietnamese voice reads Vietnamese text with its tones.
30
+
31
+ ## Screen readers and browsers
32
+
33
+ Test with at least one pair on the platform your users use most. Before a major release, test all of them.
34
+
35
+ | Screen reader | Browser | Platform |
36
+ | --- | --- | --- |
37
+ | NVDA | Firefox or Chrome | Windows |
38
+ | JAWS | Chrome | Windows |
39
+ | VoiceOver | Safari | macOS |
40
+ | VoiceOver | Safari | iOS |
41
+ | TalkBack | Chrome | Android |
42
+
43
+ ## Tools
44
+
45
+ | Tool | Use it for |
46
+ | --- | --- |
47
+ | axe DevTools or the axe test runner | Automated WCAG checks on a page or in tests |
48
+ | Browser developer tools | Accessibility tree, contrast picker, emulating reduced motion and dark mode |
49
+ | Accessibility Insights | Guided keyboard and tab-stop checks |
50
+ | A colour contrast checker | Text on images, charts and anything outside the token pairs |
51
+
52
+ ## With people
53
+
54
+ Tools cannot tell you whether a task is easy. Ask people who use a screen reader, magnification or a keyboard to try the main tasks of your product, and fix what slows them down first.
55
+
56
+ ## Report a problem
57
+
58
+ Found something in a Beehexa component or on this site? Use the feedback link at the bottom of the page, or write to [hello@beehexa.com](mailto:hello@beehexa.com?subject=Accessibility%20feedback). Confirmed problems go on the list of [known issues](/foundations/guidelines/accessibility/statement/#known-issues) until they are fixed.
@@ -1,19 +1,108 @@
1
1
  ---
2
2
  title: Accessibility
3
- description: Beehexa products meet WCAG 2.2 level AA.
3
+ description: Accessible products work for more people, in more situations. Learn how to design, build and write them with Beehexa.
4
4
  order: 1
5
+ sidebarLabel: Overview
6
+ audience: Designers, developers, writers
7
+ updated: 2026-11-04
5
8
  ---
6
9
 
7
- ## Our commitment
10
+ Picture the people who use HexaSync on an ordinary day. A store owner checks last night's orders with a screen reader. A developer fixes a sync error with only the keyboard. An accountant reads the dashboard on her phone in bright sunlight, in her second language.
8
11
 
9
- Every Beehexa product meets [WCAG 2.2](https://www.w3.org/TR/WCAG22/) level AA. Every component page has an Accessibility tab that says how the component meets it and what product teams still need to do.
12
+ Every one of them should be able to finish the job. When they can, the product becomes clearer and faster for everyone else too.
10
13
 
11
- ## Checklist
14
+ ## How Beehexa helps
12
15
 
13
- - **Contrast**: text has at least 4.5:1 contrast with its background, large text and UI parts at least 3:1.
14
- - **Keyboard**: everything that works with a mouse works with a keyboard, in a logical order.
15
- - **Focus**: keyboard focus is always visible. Use a 2 px ring in `color.border.focus`, 2 px away from the element (`border.width.focused`, `state.focus.offset`).
16
- - **Target size**: pointer targets are at least 24 × 24 CSS pixels.
17
- - **Labels**: every control has a visible label or an accessible name.
18
- - **Motion**: respect `prefers-reduced-motion`.
19
- - **Errors**: say what went wrong in text, not only with color.
16
+ Beehexa components and this site meet [WCAG 2.2](https://www.w3.org/TR/WCAG22/) level AA, the international standard for accessible web content. In the four places that matter most, Beehexa asks for more: those are the [Beehexa rules](#beehexa-rules) below.
17
+
18
+ Start from the components and much of the work is done for you: colours with enough contrast, a focus ring you can always see, targets large enough to tap, and keyboard behaviour that follows the [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/). Each component's Accessibility tab shows its keys and what is left for your team.
19
+
20
+ What a component cannot decide is how a screen fits together and what it says. That part is yours, and this page shows how. The [accessibility statement](/foundations/guidelines/accessibility/statement/) lists the standards we follow, known issues and how to report a problem.
21
+
22
+ ## Who we design for
23
+
24
+ Disability is not only something people live with for years. A broken wrist lasts six weeks. A noisy warehouse hides every sound. Sunlight on a phone washes out colour. Design for the whole range, and the same screen works for all of them.
25
+
26
+ | Need | Permanent | Temporary | Situational | What helps |
27
+ | --- | --- | --- | --- | --- |
28
+ | Seeing | Blind, low vision, colour blind | Eye strain, a migraine | Sunlight on the screen, a small phone | Strong contrast, a word or icon with every colour, alt text, zoom that does not break the layout |
29
+ | Hearing | Deaf, hard of hearing | An ear infection | A noisy office or warehouse, no headphones | Captions and transcripts, a visible message for every sound |
30
+ | Moving | Limited use of the hands, tremor | A broken wrist | A phone in one hand, a moving vehicle | Keyboard access, large targets, no time limits, no drag-only actions |
31
+ | Thinking and focus | Dyslexia, ADHD, memory loss | Stress, tiredness, side effects of medicine | Interruptions, working in a second language | Plain words, short steps, clear headings, errors that say how to fix them, a warning before big changes |
32
+
33
+ ## Principles
34
+
35
+ **Start from Beehexa components.** Contrast, focus, target size and keyboard support come built in. A custom control has to do all of that by hand, so make one only when no component fits.
36
+
37
+ **Make everything work with a keyboard.** Some people cannot use a mouse at all. If a mouse can do it, the keyboard can too, in the order people read. [Keyboard and focus](/foundations/guidelines/accessibility/keyboard-and-focus/) shows how.
38
+
39
+ **Never rely on colour alone.** About 1 in 12 men cannot tell some colours apart. "Failed" in red is clear to everyone; a red dot on its own is not.
40
+
41
+ **Give every control a clear name.** Use a visible label. A button with only an icon needs a name a screen reader can say, such as "Delete store", not "Trash".
42
+
43
+ **Write plainly, in Vietnamese and in English.** Short sentences, everyday words, one idea at a time. Many people read the product in their second language, so skip idioms and slang, and explain a term the first time it appears. See [Content](/foundations/guidelines/content/).
44
+
45
+ **Let people set up the screen their way.** People zoom in, switch to dark mode and turn motion off. The page keeps working at 200% zoom and at 320 px wide without scrolling sideways, in light and dark, with motion off.
46
+
47
+ **Use the right element in code.** A button is a `<button>`, a link is an `<a>`, and headings go from `<h1>` to `<h4>` in order. Screen reader users move around by headings and landmarks (`header`, `nav`, `main`, `footer`); a `div` that only looks like one of these is invisible to them.
48
+
49
+ **Warn before big changes.** Deleting a store, stopping a sync or sending data to another system cannot always be taken back. Say what will happen and ask people to confirm, or let them undo it. Nothing important changes just because focus moved or someone is still typing.
50
+
51
+ **Check with tools and with people.** Automated checks find some of the problems. A keyboard, a screen reader and the people who use them every day find the rest. [Testing](/foundations/guidelines/accessibility/testing/) shows how.
52
+
53
+ ## Beehexa rules
54
+
55
+ WCAG 2.2 AA is where we start. In four places Beehexa asks for more, because these are the problems people meet most often.
56
+
57
+ | Rule | What Beehexa asks | Why | Based on |
58
+ | --- | --- | --- | --- |
59
+ | Contrast | Text at least 4.5:1; large text and UI parts at least 3:1. Text people read in full, such as body text, labels and links, at least 7:1: use `color.text`, `color.text.subtle` or a link colour. `color.text.subtlest` (4.5:1) is only for short extra text such as timestamps and hints. | Long text is tiring to read when it is pale, more so on a phone in daylight | WCAG 1.4.3, 1.4.11; 1.4.6 for body text |
60
+ | Focus | Always visible: a 2 px ring in `color.border.focus`, 2 px away from the element (`border.width.focused`, `state.focus.offset`). | Keyboard users need to see where they are at every step | WCAG 2.4.7; 2.4.13 |
61
+ | Target size | At least 24 × 24 px with a mouse. On touch screens, at least 44 × 44 px (`size.target.touch`). See [Size and density](/foundations/styles/size-and-density/#target-size). | A fingertip is less precise than a pointer | WCAG 2.5.8; 2.5.5 on touch screens |
62
+ | Motion | When someone turns on reduced motion, movement that is not needed stops. See [Motion](/foundations/styles/motion/). | Movement can make some people dizzy or sick | WCAG 2.3.3 |
63
+
64
+ ## Images, video and sound
65
+
66
+ People who cannot see or hear a piece of content need the same information in another form.
67
+
68
+ | Content | Do |
69
+ | --- | --- |
70
+ | Image that carries information | Alt text that says what the image tells, not what it looks like: "Sync failed for 3 of 12 stores", not "Chart". |
71
+ | Decorative image, or an icon next to its own label | Empty alt (`alt=""`) or `aria-hidden="true"`, so it is not read twice. |
72
+ | Button with only an icon | A name that says the action, such as "Delete store". |
73
+ | Chart | A short summary in text, and the data as a table. |
74
+ | Video | Captions, and a transcript next to it. No autoplay with sound. |
75
+ | Audio or a sound alert | A transcript, and a visible message for every sound. |
76
+ | Text in an image | Avoid it. Use real text, so people can zoom, translate and listen to it. |
77
+
78
+ ## Who does what
79
+
80
+ | Beehexa gives you | Your team does |
81
+ | --- | --- |
82
+ | Colour pairs that pass contrast in light and dark | Use the pairs as listed; check text on images and charts |
83
+ | Components with keyboard support, a focus ring and the right roles for screen readers | Put them in a sensible order and keep focus where people expect it |
84
+ | A 2 px focus ring and 44 px touch targets | Keep the ring visible and the targets full size |
85
+ | Label and error styles | Write the label, the error message and the alt text |
86
+ | Light, dark and reduced-motion support | Check your own screens in each of them |
87
+
88
+ ## Before you ship
89
+
90
+ Ask these questions about every screen. [Testing](/foundations/guidelines/accessibility/testing/) explains how to check each one.
91
+
92
+ - Can you read every text, and see every icon and border, in light and in dark?
93
+ - Can you do everything with only a keyboard, in a sensible order?
94
+ - Can you always see where the keyboard focus is, even next to a sticky header or an open drawer?
95
+ - On a phone, is every control easy to tap?
96
+ - Does every control and every meaningful image say what it is?
97
+ - Do statuses and errors use words, not only colour, and do errors say how to fix the problem?
98
+ - Do the headings go in order, and does the page have a header, navigation, main content and footer?
99
+ - Does the page work at 320 px wide and at 200% zoom without scrolling sideways?
100
+ - Does movement stop when reduced motion is on?
101
+ - Do deleting, disconnecting and sending data ask first, or can people undo them?
102
+ - Is the page language set (`lang="vi"` or `lang="en"`), and are passages in the other language marked?
103
+
104
+ ## In this section
105
+
106
+ - [Keyboard and focus](/foundations/guidelines/accessibility/keyboard-and-focus/): the order focus moves in, how the focus ring looks, and the keys each kind of component uses.
107
+ - [Testing](/foundations/guidelines/accessibility/testing/): what to check before a screen ships, who checks it, and with which tools.
108
+ - [Accessibility statement](/foundations/guidelines/accessibility/statement/): the standards we follow, the issues we know about and how to report a problem.
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  title: Content
3
- description: How to write clear, concise and consistent product copy.
3
+ description: Words are most of the interface. Write product copy that is clear, short and the same everywhere, in English and in Vietnamese.
4
4
  order: 2
5
5
  ---
6
6
 
7
+ People don't read an interface; they scan it for the next thing to do. Every label, message and empty state either helps them do it or slows them down.
8
+
7
9
  ## Voice
8
10
 
9
- Clear, direct and helpful. Write for busy people who manage data across many systems.
11
+ Clear, direct and helpful. Write for busy people who manage data across many systems: say what happened and what to do next, in as few words as it takes.
10
12
 
11
13
  ## Rules
12
14
 
@@ -15,6 +17,8 @@ Clear, direct and helpful. Write for busy people who manage data across many sys
15
17
  - Keep one name for one thing across the product.
16
18
  - Use numerals for numbers: "3 orders failed".
17
19
  - Avoid jargon unless your readers use it.
20
+ - Write plainly: short sentences, everyday words, one idea at a time. Many people read the product in their second language.
21
+ - Write every status in words. Colour and icons support the words; they never replace them.
18
22
 
19
23
  ## Messages
20
24
 
@@ -23,3 +27,8 @@ Clear, direct and helpful. Write for busy people who manage data across many sys
23
27
  | Error | What happened, why, and how to fix it. |
24
28
  | Empty state | What will appear here and how to add the first item. |
25
29
  | Confirmation | The action and its consequence: "Delete 3 orders? This can't be undone." |
30
+
31
+ ## Related
32
+
33
+ - [Accessibility](/foundations/guidelines/accessibility/): names for controls, alt text and plain language.
34
+ - [Typography usage](/foundations/styles/typography/usage/): text styles, sentence case and long text.
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  title: Foundations
3
- description: Foundations create consistent user experiences. They include our design tokens, guidelines and visual styles.
3
+ description: The shared decisions behind every Beehexa screen. Learn them once and every product feels familiar.
4
4
  order: 0
5
5
  ---
6
6
 
7
- Foundations are the decisions every Beehexa interface shares. They are grouped as design tokens, guidelines and styles.
7
+ Foundations are the decisions every Beehexa screen shares: the colours, type, spacing, shapes and motion people see, and the guidelines that make products clear and accessible. Because every product starts from the same foundations, people who know one Beehexa product already know their way around the next.
8
8
 
9
- > Token values are provisional. They were taken from the current landing page while the team decides which system to base the values on.
9
+ They come in three groups. **Design tokens** hold the values. **Guidelines** cover how people read and use a screen. **Styles** explain each visual element and when to use it.
@@ -1,15 +1,22 @@
1
1
  ---
2
2
  title: Border
3
- description: Four border widths, the colour each one goes with, and how the focus ring is drawn.
3
+ description: Borders separate and outline. Most are 1 px; a thicker line means selected, focused or a status to notice.
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
+ Borders draw the edges people rely on: where a field starts, where one card ends and another begins, where the keyboard is right now.
10
+
9
11
  **Most borders are 1 px. Thicker lines mean something: selected, focused, or a status to notice.**
10
12
 
11
13
  Border colours are colour tokens: `color.border` for dividers and cards, `color.border.bold` for the edges of inputs, checkboxes and selects. See [Tokens](/foundations/styles/color/tokens/#borders).
12
14
 
15
+ An interactive bordered card keeps its frame on hover: strengthen it to
16
+ `color.border.bold` and add `elevation.shadow.raised`, never transparency or a
17
+ fading border. Keyboard focus adds the existing focus ring without removing the
18
+ frame. Cards and callouts use `radius.100` (8 px).
19
+
13
20
  ## The widths
14
21
 
15
22
  <ShapeDemo kind="border-scale" />
@@ -18,7 +25,7 @@ Border colours are colour tokens: `color.border` for dividers and cards, `color.
18
25
 
19
26
  ### `border.width.default` · 1 px
20
27
 
21
- Inputs, secondary buttons, cards, tables and dividers.
28
+ Inputs, default buttons, cards, tables and dividers.
22
29
 
23
30
  <ShapeDemo kind="border-use" item="default" />
24
31
 
@@ -36,7 +43,7 @@ The focus ring, in `color.border.focus`, drawn 2 px outside the element (`state.
36
43
 
37
44
  ### `border.width.accent` · 4 px
38
45
 
39
- A status or emphasis bar on one edge: alerts and banners, a table row with an error, callouts and quotes. The box keeps its radius on all four corners and the bar follows the curve.
46
+ A status or emphasis bar on one edge: a table row with an error, callouts and quotes. Banners don't use it; they use a tinted background (see [Color usage](/foundations/styles/color/usage/)). The box keeps its radius on all four corners and the bar follows the curve.
40
47
 
41
48
  <ShapeDemo kind="border-use" item="accent" />
42
49
 
@@ -60,13 +67,13 @@ Don't show a state with colour alone. Selected and focused also change the width
60
67
  ## Code
61
68
 
62
69
  ```css
63
- .alert {
70
+ .callout {
64
71
  position: relative;
65
72
  overflow: hidden;
66
73
  border: var(--bh-border-width-default) solid var(--bh-color-border);
67
74
  border-radius: var(--bh-radius-100);
68
75
  }
69
- .alert::before {
76
+ .callout::before {
70
77
  content: "";
71
78
  position: absolute;
72
79
  inset: 0 auto 0 0;
@@ -85,5 +92,5 @@ Don't show a state with colour alone. Selected and focused also change the width
85
92
 
86
93
  ## Related
87
94
 
88
- - [Radius](/foundations/styles/radius/): corner radius steps and the nesting rule.
95
+ - [Radius](/foundations/styles/radius/): corner role steps and functional geometry.
89
96
  - [Interaction states](/foundations/styles/interaction-states/): hover, pressed, selected and disabled.
@@ -1,11 +1,13 @@
1
1
  ---
2
2
  title: Accessibility
3
- description: The contrast every colour pair meets, which text may sit on which background, and how it is checked.
3
+ description: Every colour pair in Beehexa stays readable in light and dark. See which text sits on which background, and how contrast is checked.
4
4
  order: 6
5
5
  ---
6
6
  import ColorDemo from '../../../../components/ColorDemo.astro';
7
7
 
8
- **Every text and icon token passes WCAG 2.2 AA on every background it is paired with, in light and in dark: all 386 pairs.**
8
+ People read Beehexa screens on bright monitors, dim laptops and phones in the sun. Contrast keeps the text readable on all of them.
9
+
10
+ **Every text, icon and border token passes WCAG 2.2 AA on every background it is paired with, in light and in dark.**
9
11
 
10
12
  ## Contrast
11
13
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  title: Dark mode
3
- description: How the dark theme works, what changes and what you never do in dark.
3
+ description: Dark mode is easier on the eyes in low light. Name each colour token once and it works in both themes.
4
4
  order: 5
5
5
  ---
6
6
  import ColorDemo from '../../../../components/ColorDemo.astro';
7
7
 
8
- **Write each token once; the theme changes the value.**
8
+ Many people switch to dark mode at night, and some prefer it all day. Supporting it costs nothing extra: **write each token once; the theme changes the value.**
9
9
 
10
10
  <ColorDemo kind="themes" />
11
11
 
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  title: Color
3
- description: Three brand colours and a set of colour tokens with one job each, for text, icons, surfaces, backgrounds, borders and status, in light and dark.
3
+ description: Colour tells people what matters, what happened and where they are. Beehexa colour is calm graphite, a touch of brand yellow and four colours for status.
4
4
  order: 1
5
5
  sidebarLabel: Overview
6
6
  ---
7
7
  import ColorDemo from '../../../../components/ColorDemo.astro';
8
8
 
9
- Colour in Beehexa products is mostly graphite and white. Yellow marks the brand, and four functional colours mark status. You never pick a colour by its value: you pick a token by its job, such as `color.text` or `color.background.danger.bold`, and it is right in light and in dark.
9
+ A screen full of colour tells people nothing. Beehexa screens are mostly graphite and white, so the few colours left carry meaning: yellow for the brand, and red, orange, green and blue for status. When a sync fails, the red is the first thing people see.
10
+
11
+ You never pick a colour by its value. You pick a token by its job, such as `color.text` or `color.background.danger.bold`, and it is right in light and in dark.
10
12
 
11
13
  <ColorDemo kind="balance" />
12
14
 
@@ -63,3 +65,13 @@ Use role tokens only. Never a hex value, and never a step of a scale such as `co
63
65
  The primary button is graphite. Every other button is a default button. There is no yellow button.
64
66
 
65
67
  <ColorDemo kind="dodont" item="primary" />
68
+
69
+ ## In this section
70
+
71
+ | Page | What is in it |
72
+ |---|---|
73
+ | [Usage](/foundations/styles/color/usage/) | The token for each part of a screen, status colours, labels and interaction states. |
74
+ | [Palette](/foundations/styles/color/palette/) | Every scale and step, what each is for, and the contrast each step guarantees. |
75
+ | [Tokens](/foundations/styles/color/tokens/) | How token names are built, and every role token in light and dark. |
76
+ | [Dark mode](/foundations/styles/color/dark-mode/) | How the dark theme works and what to check in it. |
77
+ | [Accessibility](/foundations/styles/color/accessibility/) | Contrast minimums and which text goes on which background. |
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  title: Palette
3
- description: Every colour in the system, as six scales of twelve steps in light and dark, what each scale and each step is for, and the contrast each step guarantees.
3
+ description: Six colour scales of twelve steps each, in light and dark. Every step has one job, so contrast is built in.
4
4
  order: 3
5
5
  ---
6
6
  import ColorDemo from '../../../../components/ColorDemo.astro';
7
7
 
8
- **The palette feeds the role tokens. Products use the role tokens, never a palette step directly.**
8
+ The palette is the raw material of every colour in Beehexa: six scales of twelve steps, each tuned for light and dark. Products never use it directly. It feeds the role tokens, which is why a button keeps its contrast in both themes.
9
9
 
10
- Six scales of twelve steps. Hover a swatch to see its token name.
10
+ **The palette feeds the role tokens. Products use the role tokens, never a palette step directly.** Hover a swatch to see its token name.
11
11
 
12
12
  <ColorDemo kind="palette" />
13
13
 
@@ -22,7 +22,7 @@ Six scales of twelve steps. Hover a swatch to see its token name.
22
22
  | Orange | Warning | Anything else |
23
23
  | Red | Danger | Anything else |
24
24
 
25
- There is no purple, pink or teal. Charts have no palette yet: ask before colouring a chart.
25
+ There is no purple, pink or teal. Charts use the same scales. Before giving a chart colours of its own, talk to the design system team.
26
26
 
27
27
  ## What each step is for
28
28
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  title: Tokens
3
- description: How colour token names are built, every role token with its light and dark value, how to use them in code, and how to ask for a new one.
3
+ description: "Every colour token name reads like a short sentence: what is painted, what it means, how strong it is and what is happening."
4
4
  order: 4
5
5
  ---
6
6
  import ColorDemo from '../../../../components/ColorDemo.astro';
7
7
 
8
- **Every colour token name says what is painted, what it means, how strong it is and what is happening.**
8
+ **Every colour token name says what is painted, what it means, how strong it is and what is happening.** Once you can read a name, you can usually guess the token you need without looking it up.
9
9
 
10
10
  ## How names are built
11
11
 
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  title: Usage
3
- description: Which token to use for each part of a screen, how status, emphasis and states are coloured, and what not to do.
3
+ description: Find the right colour token for any part of a screen, from page backgrounds to status labels, buttons and selected rows.
4
4
  order: 2
5
5
  ---
6
6
  import ColorDemo from '../../../../components/ColorDemo.astro';
7
7
 
8
+ Every colour on a screen answers two questions: what is this, and what does it mean? Answer both and the token name follows.
9
+
8
10
  **Pick a token by what you are painting and what it means, not by how it looks.**
9
11
 
10
12
  <ColorDemo kind="example" />
@@ -14,8 +16,9 @@ import ColorDemo from '../../../../components/ColorDemo.astro';
14
16
  | I need | Use |
15
17
  |---|---|
16
18
  | Page background | `surface.page` |
17
- | Card, panel, dialog | `surface`, edge `border` |
18
- | Sidebar, table header, quiet area | `surface.subtle` |
19
+ | Card, panel | `surface`, edge `border` |
20
+ | Menu, popover, dialog, drawer | `surface.overlay`; items inside use `surface.overlay.hover`, `.pressed`, `.selected` |
21
+ | Global header and sidebar (same shell surface), mobile navigation drawer, table header, quiet area | `surface.subtle` |
19
22
  | Body text, headings, labels | `text` |
20
23
  | Descriptions, secondary table columns, navigation | `text.subtle` |
21
24
  | Metadata, timestamps, helper text, breadcrumbs | `text.subtlest` |
@@ -34,7 +37,13 @@ import ColorDemo from '../../../../components/ColorDemo.astro';
34
37
  | Error under a field | `text.danger`, `icon.danger` |
35
38
  | Banner for a status | `background.{role}.subtle`, `border.{role}.subtle`, `text`, `icon.{role}` |
36
39
  | Status in a table row | A [label](#labels) |
37
- | Tooltip, toast | `surface.inverse`, `text.inverse` |
40
+ | Tag: a category on an item | `border`, `text` on `surface` ([which one?](#label-tag-or-chip)) |
41
+ | Chip: a filter or a picked value | `border.bold`, `text` on `surface`, remove icon `icon.subtle`; when on, `background.selected` and `border.selected` |
42
+ | Tooltip | `surface.inverse`, `text.inverse` |
43
+ | Toast | `surface.overlay`, `text`, `icon.{role}`, shadow `elevation.shadow.overlay`; no border |
44
+ | Switch | Paired `switch.on.{track,thumb,label,border}` / `switch.off.{track,thumb,label,border}`; ON is neutral-bold, OFF has a strong thumb and meaningful edge, not disabled paint. See [interaction states](/foundations/styles/interaction-states/#boolean-switch). |
45
+ | Avatar with initials | `background.neutral`, `text` |
46
+ | Step number, count | `background.neutral.bold`, `text.inverse` |
38
47
  | Layer behind a dialog or drawer | `surface.scrim` |
39
48
  | Loading placeholder | `skeleton`, sheen `skeleton.subtle` |
40
49
  | Code block | `code.background`, `code.text` |
@@ -87,7 +96,27 @@ Warning is orange, not yellow: yellow is the brand. There is no sixth level; say
87
96
  |---|---|---|
88
97
  | Looks | Outline in the role's `border`, text in its `text` | Fill in the role's `bold`, text and icon in `text.on-bold` |
89
98
  | Size | 20 px, padding 6 px; large 24 px, 8 px | 32 px, padding 12 px |
90
- | Use | Many per screen: table rows, tags | One per page: the status the page is about |
99
+ | Use | Many per screen: status in table rows and lists | One per page: the status the page is about |
100
+
101
+ ### Label, tag or chip
102
+
103
+ Three small elements that look alike but do different jobs. Choose by what people can do with it, not by how it looks.
104
+
105
+ <ColorDemo kind="label-tag-chip" />
106
+
107
+ | | Label | Tag | Chip |
108
+ |---|---|---|---|
109
+ | What it is | A status the system sets | A category or attribute attached to an item | A value people entered or picked |
110
+ | Example | Synced, Failed, Expiring | Orders, Staging, Backend | An active filter, a value in a multi-select |
111
+ | People can | Only read it | Read it, or click it to filter when it links | Remove it, or turn it on and off |
112
+ | States | None | Default; hover and focus only when it links | Default, hover, focus, selected, disabled |
113
+ | Colour | The status role's `border` and `text` | `border` and `text` on `surface` | `border.bold` and `text` on `surface`; when on, `background.selected` and `border.selected` |
114
+ | Size | 20 px, or 24 px large (see above) | 24 px, padding 8 px | 24 px in dense toolbars, 32 px elsewhere |
115
+ | Radius | `radius.050` (4 px) | `radius.050` (4 px) | `radius.pill` (`radius.full`) |
116
+
117
+ - A label never looks clickable: no hover, no pointer, no remove button.
118
+ - A tag never has a remove button. Once it does, it is a chip.
119
+ - A chip always responds to people. If nothing happens when people click it, it is a tag or a label.
91
120
 
92
121
  ## Interaction states
93
122