Socket
Socket
Sign inDemoInstall

@vaadin/a11y-base

Package Overview
Dependencies
Maintainers
12
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/a11y-base - npm Package Compare versions

Comparing version 24.2.0-dev.f254716fe to 24.3.0-alpha1

8

package.json
{
"name": "@vaadin/a11y-base",
"version": "24.2.0-dev.f254716fe",
"version": "24.3.0-alpha1",
"publishConfig": {

@@ -35,3 +35,3 @@ "access": "public"

"@polymer/polymer": "^3.0.0",
"@vaadin/component-base": "24.2.0-dev.f254716fe",
"@vaadin/component-base": "24.3.0-alpha1",
"lit": "^2.0.0"

@@ -41,6 +41,6 @@ },

"@esm-bundle/chai": "^4.3.4",
"@vaadin/testing-helpers": "^0.4.3",
"@vaadin/testing-helpers": "^0.5.0",
"sinon": "^13.0.2"
},
"gitHead": "da54950b9f8c14c6451ede0d426e16a489c7fb9b"
"gitHead": "9ca6f3ca220a777e8eea181a1f5717e39a732240"
}

@@ -27,8 +27,2 @@ /**

/**
* @param {Element | Shadow} node
* @return {Element | null}
*/
const unwrapHost = (node) => (node ? node.host || unwrapHost(node.parentNode) : null);
/**
* @param {?Node} node

@@ -64,11 +58,10 @@ * @return {boolean}

if (parent.contains(target)) {
return target;
let node = target;
while (node && node !== parent) {
if (parent.contains(node)) {
return target;
}
node = node.getRootNode().host;
}
const correctedTarget = unwrapHost(target);
if (correctedTarget && parent.contains(correctedTarget)) {
return correctedTarget;
}
logError(target, 'is not contained inside', parent);

@@ -115,3 +108,9 @@ return null;

elementsToKeep.add(el);
keep(el.parentNode);
const slot = el.assignedSlot;
if (slot) {
keep(slot);
}
keep(el.parentNode || el.host);
};

@@ -129,3 +128,5 @@

[...parent.children].forEach((node) => {
const root = parent.shadowRoot;
const children = root ? [...parent.children, ...root.children] : [...parent.children];
children.forEach((node) => {
// Skip elements that don't need to be hidden

@@ -132,0 +133,0 @@ if (['template', 'script', 'style'].includes(node.localName)) {

@@ -85,8 +85,5 @@ /**

focus() {
if (!this.focusElement || this.disabled) {
return;
if (this.focusElement && !this.disabled) {
this.focusElement.focus();
}
this.focusElement.focus();
this._setFocused(true);
}

@@ -99,7 +96,5 @@

blur() {
if (!this.focusElement) {
return;
if (this.focusElement) {
this.focusElement.blur();
}
this.focusElement.blur();
this._setFocused(false);
}

@@ -106,0 +101,0 @@

@@ -6,6 +6,7 @@ /**

*/
import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
import { timeOut } from '@vaadin/component-base/src/async.js';
import { Debouncer } from '@vaadin/component-base/src/debounce.js';
import { getNormalizedScrollLeft, setNormalizedScrollLeft } from '@vaadin/component-base/src/dir-utils.js';
import { getFlattenedElements } from '@vaadin/component-base/src/dom-utils.js';
import { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';
import { KeyboardDirectionMixin } from './keyboard-direction-mixin.js';

@@ -138,4 +139,5 @@

this._observer = new FlattenedNodesObserver(this, () => {
this._setItems(this._filterItems(FlattenedNodesObserver.getFlattenedNodes(this)));
const slot = this.shadowRoot.querySelector('slot:not([name])');
this._observer = new SlotObserver(slot, () => {
this._setItems(this._filterItems(getFlattenedElements(this)));
});

@@ -142,0 +144,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc