@vaadin/avatar 24.6.0-rc1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/avatar",
3
- "version": "24.6.0-rc1",
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.0-rc1",
42
- "@vaadin/component-base": "24.6.0-rc1",
43
- "@vaadin/tooltip": "24.6.0-rc1",
44
- "@vaadin/vaadin-lumo-styles": "24.6.0-rc1",
45
- "@vaadin/vaadin-material-styles": "24.6.0-rc1",
46
- "@vaadin/vaadin-themable-mixin": "24.6.0-rc1",
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.0-rc1",
51
- "@vaadin/testing-helpers": "^1.0.0",
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": "d62ba309e3286777ad3ea7e015d50a2c4976bb42"
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 "button".
121
+ // the role attribute is set to "img".
122
122
  if (!this.hasAttribute('role')) {
123
- this.setAttribute('role', 'button');
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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/avatar",
4
- "version": "24.6.0-rc1",
4
+ "version": "24.6.1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/avatar",
4
- "version": "24.6.0-rc1",
4
+ "version": "24.6.1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {