@workday/canvas-kit-docs 16.0.11 → 16.0.13

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.
@@ -228019,6 +228019,22 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
228019
228019
  "properties": []
228020
228020
  }
228021
228021
  },
228022
+ {
228023
+ "name": "CanvasThemeAttributeContext",
228024
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/CanvasProvider.tsx",
228025
+ "description": "Context for providing the `data-theme` value to popup containers.\n\nToken stylesheets scope their variables to an attribute selector (e.g. Sana's\n`[data-theme=\"sana-canvas\"]` block defines ~300 variables — palette, shape, depth, type).\nPortaled popups render under `document.body`, outside the `CanvasProvider` wrapper, so they\nnever inherit a nested `data-theme` and none of those variables resolve. Forwarding the\nattribute itself lets the popup container match the same selector, so the whole theme applies\nthrough normal cascade — rather than trying to mirror every variable as an inline style.",
228026
+ "declarations": [
228027
+ {
228028
+ "name": "CanvasThemeAttributeContext",
228029
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/CanvasProvider.tsx"
228030
+ }
228031
+ ],
228032
+ "tags": {},
228033
+ "type": {
228034
+ "kind": "object",
228035
+ "properties": []
228036
+ }
228037
+ },
228022
228038
  {
228023
228039
  "name": "CanvasProviderProps",
228024
228040
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/CanvasProvider.tsx",
@@ -230867,7 +230883,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
230867
230883
  {
230868
230884
  "kind": "symbol",
230869
230885
  "name": "CanvasBrandRamp",
230870
- "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\", string>>"
230886
+ "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\" | \"A300\", string>>"
230871
230887
  },
230872
230888
  {
230873
230889
  "kind": "symbol",
@@ -232780,7 +232796,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
232780
232796
  {
232781
232797
  "name": "sanaCanvasNumericalTheme",
232782
232798
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/theming/sanaTheme.ts",
232783
- "description": "Sana Canvas brand tokens for scoped `CanvasProvider` / popup forwarding.\nValues are `var()` references to Sana brand variables — not merged from `defaultCanvasTheme`.",
232799
+ "description": "Sana Canvas brand tokens for scoped `CanvasProvider` / popup forwarding.\nValues are `var()` references to Sana brand variables — not merged from `defaultCanvasTheme`.\n\nMirrors only what Sana's stylesheet itself defines: the `neutral` ramp, the `A300` step of\n`primary`/`critical`/`caution`/`positive` (the one step Sana redefines for those families — a\nstronger alpha wash on the matching hue), and the four `system.color.brand.*` tokens Sana\noverrides. Every other key is intentionally omitted — Sana does not define a distinct value\nfor it, so writing it here would only reference the very variable being written (a `var()`\ncycle that resolves to invalid, leaking the classic-theme fallback color instead of Sana's).\n\n`action.*` and `selected.*` are deliberately **not** set. Sana's stylesheet does not define\n`--cnvs-brand-action-*` or `--cnvs-sys-color-brand-fg-selected`/`-surface-selected`; those are\nderived downstream from the root theme. Forcing them here would pin values the root is meant\nto own.\n\nRamp values must reference `base.*` (the underlying palette), never `brand.*` of the same\nname — CanvasProvider writes each entry onto the identically-named `--cnvs-brand-*` CSS\nvariable, so referencing `brand.*` here would create that same self-reference cycle. The\n`system.color.brand.*` overrides are the exception: they target *different* CSS variables\n(`--cnvs-sys-color-brand-*`) than the `brand.*` values they reference, so no cycle.\n\nNote this preset only covers brand tokens. The rest of Sana (shape, depth, type, non-brand\nsystem colors) comes from the stylesheet's `[data-theme=\"sana-canvas\"]` block — pass\n`data-theme` to `CanvasProvider` alongside this preset and it is forwarded to portaled popups\nso the full theme applies there too.",
232784
232800
  "declarations": [
232785
232801
  {
232786
232802
  "name": "sanaCanvasNumericalTheme",
@@ -232797,7 +232813,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
232797
232813
  {
232798
232814
  "name": "sanaCanvasProviderTheme",
232799
232815
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/theming/sanaTheme.ts",
232800
- "description": "Pass to root `CanvasProvider` to forward Sana brand CSS variables onto popup containers\n(menus, selects, modals, tooltips).\n\n**When to use it**\n- **Required** when you cannot set `data-theme=\"sana-canvas\"` on `<html>` (embedded apps,\n microfrontends, third-party shells). Popups portal to `document.body` and will not inherit\n a nested `data-theme` — this preset copies Sana brand vars onto the popup stack container.\n- Also useful in tests without global Sana CSS, or custom popup hosts outside normal cascade.\n\n**When you can skip it**\n- Prefer setting `data-theme=\"sana-canvas\"` on `<html>` with Sana CSS imported. Popups then\n inherit brand variables from the document and no `theme` prop is needed.",
232816
+ "description": "Pass to root `CanvasProvider` to forward Sana brand CSS variables onto popup containers\n(menus, selects, modals, tooltips).\n\n**When to use it**\n- **Required** when you cannot set `data-theme=\"sana-canvas\"` on `<html>` (embedded apps,\n microfrontends, third-party shells). Popups portal to `document.body` and will not inherit\n a nested `data-theme` — this preset copies Sana brand vars onto the popup stack container.\n- Also useful in tests without global Sana CSS, or custom popup hosts outside normal cascade.\n\n**When you can skip it**\n- Prefer setting `data-theme=\"sana-canvas\"` on `<html>` with Sana CSS imported. Popups then\n inherit brand variables from the document and no `theme` prop is needed.\n\nPass `data-theme=\"sana-canvas\"` alongside it. That attribute is forwarded to popup stack\ncontainers, so the rest of Sana (shape, depth, type, non-brand system colors) applies to\nportaled content through the stylesheet's own `[data-theme=\"sana-canvas\"]` block — this preset\ncovers brand tokens, the attribute covers everything else.\n\n`action.*` and selected-state tokens are not set by this preset — Sana does not define them,\nand they resolve from the root theme.",
232801
232817
  "declarations": [
232802
232818
  {
232803
232819
  "name": "sanaCanvasProviderTheme",
@@ -232805,7 +232821,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
232805
232821
  }
232806
232822
  ],
232807
232823
  "tags": {
232808
- "example": "```tsx\n// Preferred — control <html>\nimport '@workday/canvas-tokens-web/css/sana/_variables.css';\n// <html data-theme=\"sana-canvas\">\n<CanvasProvider><App /></CanvasProvider>\n\n// No access to <html> — required for popup parity\n<CanvasProvider theme={sanaCanvasProviderTheme}><App /></CanvasProvider>\n```"
232824
+ "example": "```tsx\n// Preferred — control <html>\nimport '@workday/canvas-tokens-web/css/sana/_variables.css';\n// <html data-theme=\"sana-canvas\">\n<CanvasProvider><App /></CanvasProvider>\n\n// No access to <html> — pass both for full parity, including portaled popups\n<CanvasProvider theme={sanaCanvasProviderTheme} data-theme=\"sana-canvas\">\n <App />\n</CanvasProvider>\n```"
232809
232825
  },
232810
232826
  "type": {
232811
232827
  "kind": "symbol",
@@ -233874,6 +233890,10 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
233874
233890
  {
233875
233891
  "kind": "string",
233876
233892
  "value": "A200"
233893
+ },
233894
+ {
233895
+ "kind": "string",
233896
+ "value": "A300"
233877
233897
  }
233878
233898
  ]
233879
233899
  },
@@ -233891,7 +233911,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
233891
233911
  {
233892
233912
  "name": "CanvasNeutralBrandRamp",
233893
233913
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/theming/types.ts",
233894
- "description": "Neutral brand ramp — includes Sana-only steps (`150` / `850` / `A150`) that are not\nexported for primary/critical/caution/positive families.",
233914
+ "description": "Neutral brand ramp — includes Sana-only steps (`150` / `850` / `A150` / `A850`), plus the\nextended alpha steps (`A400`–`A975`) that only the neutral family exposes.",
233895
233915
  "declarations": [
233896
233916
  {
233897
233917
  "name": "CanvasNeutralBrandRamp",
@@ -233908,7 +233928,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
233908
233928
  {
233909
233929
  "kind": "symbol",
233910
233930
  "name": "CanvasBrandRamp",
233911
- "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\", string>>"
233931
+ "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\" | \"A300\", string>>"
233912
233932
  },
233913
233933
  {
233914
233934
  "kind": "symbol",
@@ -233933,6 +233953,42 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
233933
233953
  {
233934
233954
  "kind": "string",
233935
233955
  "value": "A150"
233956
+ },
233957
+ {
233958
+ "kind": "string",
233959
+ "value": "A400"
233960
+ },
233961
+ {
233962
+ "kind": "string",
233963
+ "value": "A500"
233964
+ },
233965
+ {
233966
+ "kind": "string",
233967
+ "value": "A600"
233968
+ },
233969
+ {
233970
+ "kind": "string",
233971
+ "value": "A700"
233972
+ },
233973
+ {
233974
+ "kind": "string",
233975
+ "value": "A800"
233976
+ },
233977
+ {
233978
+ "kind": "string",
233979
+ "value": "A850"
233980
+ },
233981
+ {
233982
+ "kind": "string",
233983
+ "value": "A900"
233984
+ },
233985
+ {
233986
+ "kind": "string",
233987
+ "value": "A950"
233988
+ },
233989
+ {
233990
+ "kind": "string",
233991
+ "value": "A975"
233936
233992
  }
233937
233993
  ]
233938
233994
  },
@@ -234080,7 +234136,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
234080
234136
  "type": {
234081
234137
  "kind": "symbol",
234082
234138
  "name": "CanvasBrandRamp",
234083
- "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\", string>>"
234139
+ "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\" | \"A300\", string>>"
234084
234140
  },
234085
234141
  "description": "Primary brand ramp (`--cnvs-brand-primary-*`).\n\n**Shortcut (brand scope only):** when `'600'` is the only key under `primary`,\nalso sets:\n- `PrimaryButton` — `brand.action.base`, `accent.primary`, `accent.action`\n- Selected `Menu.Item` — `system.color.brand.fg.selected`, `surface.selected`\n\nDoes **not** set focus rings — use {@link CanvasNumericalBrandTheme.focus }\nor legacy `canvas.palette.common.focusOutline`.\n\n| Key | CSS variable | Typical consumers |\n|-----|--------------|-------------------|\n| `'600'` | `--cnvs-brand-primary-600` | PrimaryButton, brand links, accent.primary |\n| `'700'` | `--cnvs-brand-primary-700` | Strong primary fg, selected text |\n| `'500'` | `--cnvs-brand-primary-500` | Mid primary ramp only (not focus) |\n| `'A50'` | `--cnvs-brand-primary-A50` | Selected/hover surfaces |",
234086
234142
  "declarations": [
@@ -234116,7 +234172,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
234116
234172
  "type": {
234117
234173
  "kind": "symbol",
234118
234174
  "name": "CanvasBrandRamp",
234119
- "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\", string>>"
234175
+ "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\" | \"A300\", string>>"
234120
234176
  },
234121
234177
  "description": "Critical/error ramp (`--cnvs-brand-critical-*`).\n\n| Key | Typical consumers |\n|-----|-------------------|\n| `'600'` | TextInput error, DeleteButton, critical fg |\n| `'500'` | Critical focus ring, error border |\n| `'A25'` / `'A50'` | Error surface tints |",
234122
234178
  "declarations": [
@@ -234134,7 +234190,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
234134
234190
  "type": {
234135
234191
  "kind": "symbol",
234136
234192
  "name": "CanvasBrandRamp",
234137
- "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\", string>>"
234193
+ "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\" | \"A300\", string>>"
234138
234194
  },
234139
234195
  "description": "Caution/warning ramp (`--cnvs-brand-caution-*`).\n\n| Key | Typical consumers |\n|-----|-------------------|\n| `'400'` | Caution accent, TextInput caution |\n| `'500'` | Caution focus outer, caution border |\n| `'A25'` / `'A50'` | Caution surface tints |",
234140
234196
  "declarations": [
@@ -234152,7 +234208,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
234152
234208
  "type": {
234153
234209
  "kind": "symbol",
234154
234210
  "name": "CanvasBrandRamp",
234155
- "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\", string>>"
234211
+ "value": "Partial<Record<\"25\" | \"50\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\" | \"950\" | \"975\" | \"A25\" | \"A50\" | \"A100\" | \"A200\" | \"A300\", string>>"
234156
234212
  },
234157
234213
  "description": "Positive/success ramp (`--cnvs-brand-positive-*`).\n\n| Key | Typical consumers |\n|-----|-------------------|\n| `'600'` | Checkbox/Radio checked, success fg |\n| `'A25'` / `'A50'` | Success surface tints |",
234158
234214
  "declarations": [
@@ -18,11 +18,11 @@ export const packageJSONFile = `{
18
18
  "@emotion/react": "11.11.4",
19
19
  "@types/react": "18.2.60",
20
20
  "@types/react-dom": "18.2.19",
21
- "@workday/canvas-kit-labs-react": "16.0.11",
22
- "@workday/canvas-kit-preview-react": "16.0.11",
23
- "@workday/canvas-kit-react": "16.0.11",
24
- "@workday/canvas-kit-react-fonts": "^16.0.11",
25
- "@workday/canvas-kit-styling": "16.0.11",
21
+ "@workday/canvas-kit-labs-react": "16.0.13",
22
+ "@workday/canvas-kit-preview-react": "16.0.13",
23
+ "@workday/canvas-kit-react": "16.0.13",
24
+ "@workday/canvas-kit-react-fonts": "^16.0.13",
25
+ "@workday/canvas-kit-styling": "16.0.13",
26
26
  "@workday/canvas-system-icons-web": "^5.0.3",
27
27
  "@workday/canvas-expressive-icons-web": "1.0.1",
28
28
  "@workday/canvas-tokens-web": "4.4.0-beta.11"
@@ -19,11 +19,11 @@ export const packageJSONFile = `{
19
19
  "@emotion/react": "11.11.4",
20
20
  "@types/react": "18.2.60",
21
21
  "@types/react-dom": "18.2.19",
22
- "@workday/canvas-kit-labs-react": "16.0.11",
23
- "@workday/canvas-kit-preview-react": "16.0.11",
24
- "@workday/canvas-kit-react": "16.0.11",
25
- "@workday/canvas-kit-react-fonts": "^16.0.11",
26
- "@workday/canvas-kit-styling": "16.0.11",
22
+ "@workday/canvas-kit-labs-react": "16.0.13",
23
+ "@workday/canvas-kit-preview-react": "16.0.13",
24
+ "@workday/canvas-kit-react": "16.0.13",
25
+ "@workday/canvas-kit-react-fonts": "^16.0.13",
26
+ "@workday/canvas-kit-styling": "16.0.13",
27
27
  "@workday/canvas-system-icons-web": "^5.0.3",
28
28
  "@workday/canvas-expressive-icons-web": "1.0.1",
29
29
  "@workday/canvas-tokens-web": "4.4.0-beta.11"
@@ -70,6 +70,21 @@ parent component's DOM hierarchy, and only inherit theme from `<html>`, or from
70
70
  > `[data-theme="sana-canvas"]` overrides, so removing the attribute is how you get classic Canvas —
71
71
  > there's nothing to undo it with.
72
72
 
73
+ **Scoped / no document-root control:** if you cannot set `data-theme` on `<html>` (embedded apps,
74
+ microfrontends, third-party shells), pass both `data-theme="sana-canvas"` and
75
+ `sanaCanvasProviderTheme` to `CanvasProvider`. The preset supplies Sana's brand variables, and
76
+ Canvas Kit forwards the `data-theme` attribute onto the popup stack container — so portaled
77
+ menus, modals, and dialogs match the same `[data-theme="sana-canvas"]` selector and pick up the
78
+ rest of the theme (shape, depth, type, non-brand system colors) through normal cascade:
79
+
80
+ ```tsx
81
+ import {CanvasProvider, sanaCanvasProviderTheme} from '@workday/canvas-kit-react/common';
82
+
83
+ <CanvasProvider theme={sanaCanvasProviderTheme} data-theme="sana-canvas">
84
+ <App />
85
+ </CanvasProvider>
86
+ ```
87
+
73
88
  ### What Changes When You Opt In
74
89
 
75
90
  Things that change are primary brand consumers and Sana's neutral color scale
@@ -1,4 +1,4 @@
1
- import { ExampleCodeBlock, SymbolDoc } from '@workday/canvas-kit-docs';
1
+ import {ExampleCodeBlock, SymbolDoc} from '@workday/canvas-kit-docs';
2
2
 
3
3
  import Basic from './examples/Basic';
4
4
  import Custom from './examples/Custom';
@@ -46,6 +46,10 @@ position of the icon may be adjusted depending on where you place it in the mark
46
46
 
47
47
  <ExampleCodeBlock code={Icon} />
48
48
 
49
+ > **Accessibility Note**: In this example, the icon is used as a decoration and is intentionally
50
+ > hidden from screen readers. If you're using icons to convey additional information, add
51
+ > `role="img"` and a translated `aria-label` string to `StatusIndicator.Icon`.
52
+
49
53
  ### Overflow
50
54
 
51
55
  We **strongly** discourage using text in a `StatusIndicator` which will cause it to exceed its
@@ -61,14 +65,16 @@ of `StatusIndicator` via [style props](/get-started/for-developers/documentation
61
65
  Set the `variant` prop of `StatusIndicator` to adjust its background color. `variant` accepts the
62
66
  following values:
63
67
 
64
- - `gray`
65
- - `orange`
66
- - `blue`
67
- - `green`
68
- - `red`
68
+ - `neutral` (default; `gray` is a deprecated alias)
69
+ - `caution` (`orange` is a deprecated alias)
70
+ - `info` (`blue` is a deprecated alias)
71
+ - `positive` (`green` is a deprecated alias)
72
+ - `critical` (`red` is a deprecated alias)
69
73
  - `transparent`
70
74
 
71
75
  The background color dictated by the `variant` will be dark or light based on the `emphasis`.
76
+ `variant` and `emphasis` change color only—they do not change the accessible name. Put the status
77
+ meaning in **`StatusIndicator.Label`**.
72
78
 
73
79
  <ExampleCodeBlock code={Variants} />
74
80
 
@@ -84,6 +90,113 @@ Status Indicator and its subcomponents support custom styling via the `cs` prop.
84
90
  information, check our
85
91
  ["How To Customize Styles"](https://workday.github.io/canvas-kit/?path=/docs/styling-guides-customizing-styles--docs).
86
92
 
93
+ ## Accessibility
94
+
95
+ `StatusIndicator` is a compact, **non-interactive** status label. The accessibility goal is that
96
+ assistive technology users get the same status meaning as sighted users from
97
+ **`StatusIndicator.Label`** text—not from color, emphasis, or a decorative icon.
98
+
99
+ ### Minimum Accessible Structure
100
+
101
+ The following matches the [Basic Example](#basic-example): a container and a visible label. Icon is
102
+ optional.
103
+
104
+ ```tsx
105
+ import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
106
+
107
+ <StatusIndicator>
108
+ <StatusIndicator.Label>Unpublished</StatusIndicator.Label>
109
+ </StatusIndicator>;
110
+ ```
111
+
112
+ Always include **`StatusIndicator.Label`** with concise text that names the status. Do not rely on
113
+ **`variant`**, **`emphasis`**, or **`StatusIndicator.Icon`** as the only indicator of meaning.
114
+
115
+ ### Built-in Behaviors
116
+
117
+ Canvas Kit applies visual layout and color through `statusIndicatorStencil` when you compose
118
+ **`StatusIndicator`**, **`StatusIndicator.Label`**, and optionally **`StatusIndicator.Icon`**. It
119
+ does **not** apply `role="img"` or an accessible name on the icon. **Do not duplicate them** in
120
+ consuming code. Only add icon ARIA when the informative-icon requirement below applies.
121
+
122
+ **ARIA and DOM** (_applied by subcomponents_):
123
+
124
+ - **`StatusIndicator`**: renders a `div` (override with `as` if needed). Default `maxWidth` is
125
+ `200px`. Default `variant` is `neutral`; default `emphasis` is `low`. No ARIA role is set.
126
+ - **`StatusIndicator.Label`**: renders a `span` with bold subtext, `white-space: nowrap`,
127
+ `overflow: hidden`, and `text-overflow: ellipsis`. Truncation is visual; the full text remains in
128
+ the accessibility tree.
129
+ - **`StatusIndicator.Icon`**: renders `SystemIcon` at size `20`. It does **not** set `role="img"` or
130
+ `aria-label`. If `icon.type` is missing, the icon renders nothing.
131
+
132
+ **Keyboard** (_not a control by default_):
133
+
134
+ - **`StatusIndicator`** is not in the tab order. There is no built-in keyboard behavior.
135
+
136
+ **Screen reader expectations** (_when built-in behaviors are used as intended_):
137
+
138
+ - Assistive technology should announce the **`StatusIndicator.Label`** text as the content of the
139
+ indicator
140
+ - `variant` and `emphasis` are **not** announced
141
+ - A decorative **`StatusIndicator.Icon`** (no `role="img"`) should not add a separate accessible
142
+ name
143
+ - [**OverflowTooltip**](https://workday.github.io/canvas-kit/?path=/docs/components-popups-tooltip--docs#tooltips-on-overflowing-content)
144
+ uses `type="muted"` and does not set `aria-label` on the target—the accessible name stays the
145
+ element's text content
146
+
147
+ ### Accessibility Requirements
148
+
149
+ Required in application code for an accessible Status Indicator. Rows marked _(conditional)_ apply
150
+ only when the situation matches—otherwise omit.
151
+
152
+ **If no design spec is provided:** include a visible **`StatusIndicator.Label`**; keep the icon
153
+ decorative (omit `role="img"` and `aria-label`); omit `tabIndex` and **`OverflowTooltip`**. Prefer
154
+ short label text so truncation is unnecessary.
155
+
156
+ | Requirement | How to satisfy |
157
+ | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
158
+ | Visible status text | **`StatusIndicator.Label`** with translated text that names the status (for example, "Unpublished", not color alone) |
159
+ | Color is not the only indicator | Use **`variant`** / **`emphasis`** only as visual reinforcement of the label. See [Failure of Success Criterion 1.4.1 due to identifying required or error fields using color differences only](https://www.w3.org/WAI/WCAG22/Techniques/failures/F81) |
160
+ | Decorative icon _(conditional)_ | **`StatusIndicator.Icon`** with `icon={...}` and **no** `role="img"` when the icon only supports the label visually |
161
+ | Informative icon _(conditional)_ | On **`StatusIndicator.Icon`**, set `role="img"` and a translated `aria-label` that adds meaning **beyond** the label text |
162
+ | Overflowed label _(conditional)_ | Avoid exceeding the `200px` max width. If truncation cannot be avoided, wrap **`StatusIndicator`** in **`OverflowTooltip`** and set `tabIndex={0}` so keyboard and mouse users can reveal the full text. See the [Overflow example](#overflow) |
163
+
164
+ **Informative icon** _(conditional)_:
165
+
166
+ ```tsx
167
+ import {StatusIndicator} from '@workday/canvas-kit-preview-react/status-indicator';
168
+ import {cloudArrowUpIcon} from '@workday/canvas-system-icons-web';
169
+
170
+ <StatusIndicator>
171
+ <StatusIndicator.Icon role="img" aria-label="Waiting to sync" icon={cloudArrowUpIcon} />
172
+ <StatusIndicator.Label>Unpublished</StatusIndicator.Label>
173
+ </StatusIndicator>;
174
+ ```
175
+
176
+ **Summary for code generation:**
177
+
178
+ - **REQUIRED:** visible **`StatusIndicator.Label`** whose text conveys the status
179
+ - **CONDITIONAL:** `role="img"` + translated `aria-label` on **`StatusIndicator.Icon`**,
180
+ **`OverflowTooltip`** + `tabIndex={0}`
181
+
182
+ ### Anti-Patterns
183
+
184
+ Do **not** generate code that does the following (see **Accessibility Requirements** above for what
185
+ to supply instead):
186
+
187
+ - Omit **`StatusIndicator.Label`** or use an empty label, relying on `variant`, `emphasis`, or an
188
+ icon for meaning
189
+ - Set `role="img"` on a decorative **`StatusIndicator.Icon`**, or set `role="img"` without a
190
+ translated `aria-label`—that can expose an unnamed image to assistive technology. See **Decorative
191
+ icon** and **Informative icon** in **Accessibility Requirements**
192
+ - Duplicate the label text as `aria-label` on the icon when the icon adds no extra meaning
193
+ - Add `role="status"`, `aria-live`, or `aria-label` on **`StatusIndicator`** by default—Canvas Kit
194
+ does not wire these, and they change how assistive technology treats a static label. If a design
195
+ requires announcing asynchronous updates, see
196
+ [ARIA Live Regions](https://workday.github.io/canvas-kit/?path=/docs/guides-accessibility-aria-live-regions--docs)
197
+ - Truncate label text without **`OverflowTooltip`** and `tabIndex={0}` when keyboard users must read
198
+ the overflow
199
+
87
200
  ## Component API
88
201
 
89
202
  <SymbolDoc name="StatusIndicator" fileName="/preview-react/" />
@@ -12,12 +12,12 @@ export default () => {
12
12
  return (
13
13
  <Flex cs={parentContainerStyles}>
14
14
  <StatusIndicator>
15
- <StatusIndicator.Icon aria-label="unpublished" icon={cloudArrowUpIcon} />
15
+ <StatusIndicator.Icon icon={cloudArrowUpIcon} />
16
16
  <StatusIndicator.Label>Unpublished</StatusIndicator.Label>
17
17
  </StatusIndicator>
18
18
  <StatusIndicator variant="positive">
19
19
  <StatusIndicator.Label>published</StatusIndicator.Label>
20
- <StatusIndicator.Icon aria-label="published" icon={cloudArrowUpIcon} />
20
+ <StatusIndicator.Icon icon={cloudArrowUpIcon} />
21
21
  </StatusIndicator>
22
22
  </Flex>
23
23
  );
@@ -116,9 +116,11 @@ import {CanvasProvider} from '@workday/canvas-kit-react/common';
116
116
  ```
117
117
 
118
118
  **Scoped / no document-root control:** if you cannot set `data-theme` on `<html>` (embedded apps,
119
- microfrontends, third-party shells), a nested `data-theme` alone does **not** reach portaled
120
- popups. Pass both `data-theme="sana-canvas"` (for in-tree UI) and `sanaCanvasProviderTheme` (so
121
- Canvas Kit forwards Sana brand variables onto the popup stack container):
119
+ microfrontends, third-party shells), pass both `data-theme="sana-canvas"` and
120
+ `sanaCanvasProviderTheme` to `CanvasProvider`. The preset supplies Sana's brand variables, and
121
+ Canvas Kit forwards the `data-theme` attribute onto the popup stack container — so portaled
122
+ menus, modals, and dialogs match the same `[data-theme="sana-canvas"]` selector and pick up the
123
+ rest of the theme (shape, depth, type, non-brand system colors) through normal cascade:
122
124
 
123
125
  ```tsx
124
126
  import {CanvasProvider, sanaCanvasProviderTheme} from '@workday/canvas-kit-react/common';
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
 
3
- import {PrimaryButton, SecondaryButton} from '@workday/canvas-kit-react/button';
3
+ import {PrimaryButton} from '@workday/canvas-kit-react/button';
4
4
  import {CanvasProvider, sanaCanvasProviderTheme} from '@workday/canvas-kit-react/common';
5
+ import {FormField} from '@workday/canvas-kit-react/form-field';
5
6
  import {Menu} from '@workday/canvas-kit-react/menu';
6
7
  import {Popup, useCloseOnOutsideClick, usePopupModel} from '@workday/canvas-kit-react/popup';
8
+ import {TextInput} from '@workday/canvas-kit-react/text-input';
7
9
 
8
10
  /**
9
11
  * Scoped Sana setup for popup parity: `data-theme` themes the in-tree UI, and
@@ -16,17 +18,25 @@ export default () => {
16
18
  return (
17
19
  <CanvasProvider theme={sanaCanvasProviderTheme} data-theme="sana-canvas">
18
20
  <Popup model={myModel}>
19
- <Popup.Target as={SecondaryButton}>Open Menu</Popup.Target>
21
+ <Popup.Target as={PrimaryButton}>Open Menu</Popup.Target>
20
22
  <Popup.Popper>
21
23
  <Popup.Card>
22
24
  <Popup.Body>
23
- <Menu>
24
- <Menu.Item>Option 1</Menu.Item>
25
- <Menu.Item>Option 2</Menu.Item>
26
- <Menu.Item>Option 3</Menu.Item>
25
+ <Menu initialSelectedIds={['selected']}>
26
+ <Menu.List role="listbox">
27
+ <Menu.Option data-id="selected">Option 1</Menu.Option>
28
+ <Menu.Option>Option 2</Menu.Option>
29
+ <Menu.Option>Option 3</Menu.Option>
30
+ </Menu.List>
27
31
  </Menu>
28
32
  <PrimaryButton>Hello World</PrimaryButton>
29
33
  </Popup.Body>
34
+ <FormField>
35
+ <FormField.Label>Example text input</FormField.Label>
36
+ <FormField.Field>
37
+ <FormField.Input as={TextInput} />
38
+ </FormField.Field>
39
+ </FormField>
30
40
  </Popup.Card>
31
41
  </Popup.Popper>
32
42
  </Popup>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "16.0.11",
3
+ "version": "16.0.13",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -47,10 +47,10 @@
47
47
  "@stackblitz/sdk": "^1.11.0",
48
48
  "@storybook/csf": "0.0.1",
49
49
  "@workday/canvas-expressive-icons-web": "1.0.2",
50
- "@workday/canvas-kit-labs-react": "^16.0.11",
51
- "@workday/canvas-kit-preview-react": "^16.0.11",
52
- "@workday/canvas-kit-react": "^16.0.11",
53
- "@workday/canvas-kit-styling": "^16.0.11",
50
+ "@workday/canvas-kit-labs-react": "^16.0.13",
51
+ "@workday/canvas-kit-preview-react": "^16.0.13",
52
+ "@workday/canvas-kit-react": "^16.0.13",
53
+ "@workday/canvas-kit-styling": "^16.0.13",
54
54
  "@workday/canvas-system-icons-web": "^5.0.3",
55
55
  "@workday/canvas-tokens-web": "^4.4.0",
56
56
  "markdown-to-jsx": "^7.2.0",
@@ -63,5 +63,5 @@
63
63
  "mkdirp": "^1.0.3",
64
64
  "typescript": "5.0"
65
65
  },
66
- "gitHead": "c24d68b9e1fa5a1e5af583d3240bf64c369d5037"
66
+ "gitHead": "e9dd2a5816799426ed59d7b4a3c8b6b56300aa68"
67
67
  }