From 6eda408669ba0bd36213d5fbbf80dc5c156dd282 Mon Sep 17 00:00:00 2001 From: StoianLucian <101817370+StoianLucian@users.noreply.github.com> Date: Tue, 6 Feb 2024 13:03:44 +0200 Subject: [PATCH] added titles value to the alt attribute and removed title after --- coral-component-dialog/src/scripts/Dialog.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/coral-component-dialog/src/scripts/Dialog.js b/coral-component-dialog/src/scripts/Dialog.js index 33c5181df6..58d47b4586 100644 --- a/coral-component-dialog/src/scripts/Dialog.js +++ b/coral-component-dialog/src/scripts/Dialog.js @@ -363,6 +363,15 @@ const Dialog = Decorator(class extends BaseOverlay(BaseComponent(HTMLElement)) { this._fullscreen = transform.booleanAttr(value); this._reflectAttribute('fullscreen', this._fullscreen); + var icons = this._elements.header.querySelectorAll('coral-Icon'); + + icons.forEach(function (icon) { + if (icon.parentElement.hasAttribute("title")) { + icon.setAttribute("alt", icon.parentElement.title); + icon.parentElement.removeAttribute("title"); + } + }); + if (this._fullscreen) { // Full screen and movable are not compatible this.movable = false;