@vaadin/vaadin-button
Advanced tools
Comparing version 2.1.4 to 2.1.5
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-button", | ||
"version": "2.1.4", | ||
"version": "2.1.5", | ||
"main": "vaadin-button.js", | ||
@@ -16,0 +16,0 @@ "author": "Vaadin Ltd", |
@@ -118,3 +118,3 @@ [![npm version](https://badgen.net/npm/v/@vaadin/vaadin-button)](https://www.npmjs.com/package/@vaadin/vaadin-button) | ||
We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `gulp lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files. | ||
We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `npm run lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files. | ||
@@ -121,0 +121,0 @@ |
@@ -127,3 +127,3 @@ /** | ||
</div> | ||
<button id="button" type="button" aria-label\$="[[_ariaLabel]]"></button> | ||
<button id="button" type="button"></button> | ||
`; | ||
@@ -137,23 +137,5 @@ } | ||
static get version() { | ||
return '2.1.4'; | ||
return '2.1.5'; | ||
} | ||
static get properties() { | ||
return { | ||
/** | ||
* Set the `aria-label` attribute for assistive technologies like | ||
* screen readers. An `undefined` value for this property (the | ||
* default) means that the `aria-label` attribute is not present at | ||
* all. | ||
*/ | ||
_ariaLabel: { | ||
type: String | ||
} | ||
}; | ||
} | ||
static get observedAttributes() { | ||
return super.observedAttributes.concat(['aria-label']); | ||
} | ||
ready() { | ||
@@ -170,3 +152,2 @@ super.ready(); | ||
this._addActiveListeners(); | ||
this._updateAriaLabel(this.getAttribute('aria-label')); | ||
} | ||
@@ -187,12 +168,2 @@ | ||
/** | ||
* @protected | ||
*/ | ||
attributeChangedCallback(attr, oldVal, newVal) { | ||
super.attributeChangedCallback(attr, oldVal, newVal); | ||
if (attr === 'aria-label') { | ||
this._updateAriaLabel(newVal); | ||
} | ||
} | ||
_addActiveListeners() { | ||
@@ -206,6 +177,2 @@ addListener(this, 'down', () => !this.disabled && this.setAttribute('active', '')); | ||
_updateAriaLabel(ariaLabel) { | ||
this._ariaLabel = ariaLabel !== undefined && ariaLabel !== null ? ariaLabel : this.innerText; | ||
} | ||
/** | ||
@@ -212,0 +179,0 @@ * @protected |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
33519
519
1