@vaadin/a11y-base
Advanced tools
Comparing version 24.4.0-alpha2 to 24.4.0-alpha20
{ | ||
"name": "@vaadin/a11y-base", | ||
"version": "24.4.0-alpha2", | ||
"version": "24.4.0-alpha20", | ||
"publishConfig": { | ||
@@ -35,3 +35,3 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/component-base": "24.4.0-alpha2", | ||
"@vaadin/component-base": "24.4.0-alpha20", | ||
"lit": "^3.0.0" | ||
@@ -44,3 +44,3 @@ }, | ||
}, | ||
"gitHead": "f303ead58d27e15d81a55db0559611fb77c0e421" | ||
"gitHead": "9d2eacc494eb27658ba9298be6656815912637be" | ||
} |
@@ -39,3 +39,3 @@ /** | ||
if (idx >= 0) { | ||
items[idx].focus(); | ||
this._focus(idx); | ||
} | ||
@@ -42,0 +42,0 @@ } |
@@ -11,2 +11,3 @@ /** | ||
import { SlotObserver } from '@vaadin/component-base/src/slot-observer.js'; | ||
import { isElementHidden } from './focus-utils.js'; | ||
import { KeyboardDirectionMixin } from './keyboard-direction-mixin.js'; | ||
@@ -121,4 +122,11 @@ | ||
} | ||
const firstItem = this.querySelector('[tabindex="0"]') || (this.items ? this.items[0] : null); | ||
this._focusItem(firstItem); | ||
const items = Array.isArray(this.items) ? this.items : []; | ||
const idx = this._getAvailableIndex(items, 0, null, (item) => item.tabIndex === 0 && !isElementHidden(item)); | ||
if (idx >= 0) { | ||
this._focus(idx); | ||
} else { | ||
// Call `KeyboardDirectionMixin` logic to focus first non-disabled item. | ||
super.focus(); | ||
} | ||
} | ||
@@ -125,0 +133,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
103095
2722
+ Added@vaadin/component-base@24.4.0-alpha20(transitive)
- Removed@vaadin/component-base@24.4.0-alpha2(transitive)