studiokit-scaffolding-js 4.5.4 → 4.5.5
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.
|
@@ -62,8 +62,12 @@ var Image = /** @class */ (function (_super) {
|
|
|
62
62
|
Image.create = function (value) {
|
|
63
63
|
var _a, _b, _c;
|
|
64
64
|
var node = _super.create.call(this, this.tagName);
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
if ((_a = value.alt) === null || _a === void 0 ? void 0 : _a.trim()) {
|
|
66
|
+
node.setAttribute('alt', value.alt);
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
node.className = 'alt-text-missing';
|
|
70
|
+
}
|
|
67
71
|
node.setAttribute('src', value.src);
|
|
68
72
|
// Setting up the height and width to be reactive when an image is getting resize
|
|
69
73
|
node.setAttribute('height', (_b = value.height) !== null && _b !== void 0 ? _b : 'auto');
|
|
@@ -75,7 +79,7 @@ var Image = /** @class */ (function (_super) {
|
|
|
75
79
|
return {
|
|
76
80
|
width: node.getAttribute('width'),
|
|
77
81
|
height: node.getAttribute('height'),
|
|
78
|
-
alt: node.getAttribute('alt'),
|
|
82
|
+
alt: node.getAttribute('alt') || undefined,
|
|
79
83
|
src: node.getAttribute('src')
|
|
80
84
|
};
|
|
81
85
|
};
|
package/lib/css/variables.css
CHANGED
package/package.json
CHANGED