origam 2.18.4 → 2.18.6

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.
@@ -25,6 +25,7 @@
25
25
  key="container"
26
26
  ref="containerRef"
27
27
  class="origam-slide-group__container"
28
+ :tabindex="isOverflowing && !hasFocusableContent ? 0 : undefined"
28
29
  @scroll="handleScroll"
29
30
  >
30
31
  <div
@@ -138,6 +139,7 @@ const { marginClasses, marginStyles } = useMargin(props);
138
139
  const { displayClasses, mobile } = useDisplay(props);
139
140
  const group = useGroup(props, ORIGAM_SLIDE_GROUP_KEY);
140
141
  const isOverflowing = shallowRef(false);
142
+ const hasFocusableContent = shallowRef(false);
141
143
  const scrollOffset = shallowRef(0);
142
144
  const containerSize = shallowRef(0);
143
145
  const contentSize = shallowRef(0);
@@ -172,6 +174,9 @@ if (IN_BROWSER) {
172
174
  contentSize.value = contentRect.value[sizeProperty];
173
175
  isOverflowing.value = containerSize.value + 1 < contentSize.value;
174
176
  }
177
+ if (contentRef.value) {
178
+ hasFocusableContent.value = focusableChildren(contentRef.value).length > 0;
179
+ }
175
180
  if (firstSelectedIndex.value >= 0 && contentRef.value) {
176
181
  const selectedElement = contentRef.value.children[lastSelectedIndex.value];
177
182
  scrollToChildren(selectedElement, props.centerActive);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "origam",
3
- "version": "2.18.4",
3
+ "version": "2.18.6",
4
4
  "type": "module",
5
5
  "description": "origam — a Vue 3 design system with multi-theme design tokens, CSS-first components and TypeScript types.",
6
6
  "keywords": [