@vaadin/avatar 24.6.0 → 24.6.1
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/package.json +10 -10
- package/src/vaadin-avatar-mixin.js +10 -2
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/avatar",
|
|
3
|
-
"version": "24.6.
|
|
3
|
+
"version": "24.6.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,22 +38,22 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
40
40
|
"@polymer/polymer": "^3.0.0",
|
|
41
|
-
"@vaadin/a11y-base": "~24.6.
|
|
42
|
-
"@vaadin/component-base": "~24.6.
|
|
43
|
-
"@vaadin/tooltip": "~24.6.
|
|
44
|
-
"@vaadin/vaadin-lumo-styles": "~24.6.
|
|
45
|
-
"@vaadin/vaadin-material-styles": "~24.6.
|
|
46
|
-
"@vaadin/vaadin-themable-mixin": "~24.6.
|
|
41
|
+
"@vaadin/a11y-base": "~24.6.1",
|
|
42
|
+
"@vaadin/component-base": "~24.6.1",
|
|
43
|
+
"@vaadin/tooltip": "~24.6.1",
|
|
44
|
+
"@vaadin/vaadin-lumo-styles": "~24.6.1",
|
|
45
|
+
"@vaadin/vaadin-material-styles": "~24.6.1",
|
|
46
|
+
"@vaadin/vaadin-themable-mixin": "~24.6.1",
|
|
47
47
|
"lit": "^3.0.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@vaadin/chai-plugins": "~24.6.
|
|
51
|
-
"@vaadin/testing-helpers": "^1.
|
|
50
|
+
"@vaadin/chai-plugins": "~24.6.1",
|
|
51
|
+
"@vaadin/testing-helpers": "^1.1.0",
|
|
52
52
|
"sinon": "^18.0.0"
|
|
53
53
|
},
|
|
54
54
|
"web-types": [
|
|
55
55
|
"web-types.json",
|
|
56
56
|
"web-types.lit.json"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "858d4220653a0603ce9c36da054889eb42ceb327"
|
|
59
59
|
}
|
|
@@ -118,9 +118,9 @@ export const AvatarMixin = (superClass) =>
|
|
|
118
118
|
this.__updateVisibility();
|
|
119
119
|
|
|
120
120
|
// By default, if the user hasn't provided a custom role,
|
|
121
|
-
// the role attribute is set to "
|
|
121
|
+
// the role attribute is set to "img".
|
|
122
122
|
if (!this.hasAttribute('role')) {
|
|
123
|
-
this.setAttribute('role', '
|
|
123
|
+
this.setAttribute('role', 'img');
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
if (!this.hasAttribute('tabindex')) {
|
|
@@ -185,6 +185,14 @@ export const AvatarMixin = (superClass) =>
|
|
|
185
185
|
this.__setTooltip(name);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
|
+
|
|
189
|
+
if (abbr) {
|
|
190
|
+
// By default, generate aria-label attribute containing the abbr value.
|
|
191
|
+
// When no tooltip is set, prefix the aria-label with the name value.
|
|
192
|
+
this.setAttribute('aria-label', !tooltipNode && name ? `${name} (${abbr})` : abbr);
|
|
193
|
+
} else {
|
|
194
|
+
this.removeAttribute('aria-label');
|
|
195
|
+
}
|
|
188
196
|
}
|
|
189
197
|
|
|
190
198
|
/** @private */
|
package/web-types.json
CHANGED