@tangle-network/ui 11.16.1 → 11.16.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tangle-network/ui
2
2
 
3
+ ## 11.16.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 74e6dfb: `CommandPreview` output regions are keyboard-focusable and labelled (stdout, stderr, error), so a long output that scrolls inside the block can be scrolled without a pointer (WCAG 2.1.1; axe `scrollable-region-focusable`).
8
+
3
9
  ## 11.16.1
4
10
 
5
11
  ### Patch Changes
@@ -171,16 +171,21 @@ const CommandPreview = memo(({ part, defaultExpanded = false, className }) => {
171
171
  className: "border-t border-white/10",
172
172
  children: [
173
173
  output.stdout ? /* @__PURE__ */ jsx("pre", {
174
- className: "max-h-80 overflow-auto whitespace-pre-wrap break-all px-3 py-2 leading-relaxed",
174
+ tabIndex: 0,
175
+ "aria-label": "stdout",
176
+ className: cn("max-h-80 overflow-auto whitespace-pre-wrap break-all px-3 py-2 leading-relaxed", focusRing),
175
177
  children: output.stdout
176
178
  }) : null,
177
179
  output.stderr ? /* @__PURE__ */ jsx("pre", {
180
+ tabIndex: 0,
178
181
  "aria-label": "stderr",
179
- className: "max-h-80 overflow-auto whitespace-pre-wrap break-all border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]",
182
+ className: cn("max-h-80 overflow-auto whitespace-pre-wrap break-all border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]", focusRing),
180
183
  children: output.stderr
181
184
  }) : null,
182
185
  errorText ? /* @__PURE__ */ jsx("pre", {
183
- className: "max-h-80 overflow-auto whitespace-pre-wrap break-all border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]",
186
+ tabIndex: 0,
187
+ "aria-label": "error",
188
+ className: cn("max-h-80 overflow-auto whitespace-pre-wrap break-all border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]", focusRing),
184
189
  children: errorText
185
190
  }) : null
186
191
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/ui",
3
- "version": "11.16.1",
3
+ "version": "11.16.2",
4
4
  "description": "Generic React UI components for Tangle products — primitives, chat, run, files, editor, markdown.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -235,20 +235,38 @@ export const CommandPreview = memo(
235
235
  {expanded && hasBody ? (
236
236
  <div id={bodyId} className="border-t border-white/10">
237
237
  {output.stdout ? (
238
- <pre className="max-h-80 overflow-auto whitespace-pre-wrap break-all px-3 py-2 leading-relaxed">
238
+ <pre
239
+ tabIndex={0}
240
+ aria-label="stdout"
241
+ className={cn(
242
+ "max-h-80 overflow-auto whitespace-pre-wrap break-all px-3 py-2 leading-relaxed",
243
+ focusRing,
244
+ )}
245
+ >
239
246
  {output.stdout}
240
247
  </pre>
241
248
  ) : null}
242
249
  {output.stderr ? (
243
250
  <pre
251
+ tabIndex={0}
244
252
  aria-label="stderr"
245
- className="max-h-80 overflow-auto whitespace-pre-wrap break-all border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]"
253
+ className={cn(
254
+ "max-h-80 overflow-auto whitespace-pre-wrap break-all border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]",
255
+ focusRing,
256
+ )}
246
257
  >
247
258
  {output.stderr}
248
259
  </pre>
249
260
  ) : null}
250
261
  {errorText ? (
251
- <pre className="max-h-80 overflow-auto whitespace-pre-wrap break-all border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]">
262
+ <pre
263
+ tabIndex={0}
264
+ aria-label="error"
265
+ className={cn(
266
+ "max-h-80 overflow-auto whitespace-pre-wrap break-all border-t border-white/10 px-3 py-2 leading-relaxed text-[var(--surface-danger-text)]",
267
+ focusRing,
268
+ )}
269
+ >
252
270
  {errorText}
253
271
  </pre>
254
272
  ) : null}