Enhance icon button label check (#1543)

This commit is contained in:
Leon Vogt
2025-10-13 16:39:29 +02:00
committed by GitHub
parent 0eb8eaea00
commit 0b45173192

View File

@@ -181,7 +181,7 @@ export default class WaButton extends WebAwesomeFormAssociatedElement {
[...nodes].forEach(node => {
if (node.nodeType === Node.ELEMENT_NODE && (node as HTMLElement).localName === 'wa-icon') {
hasIcon = true;
if (!hasIconLabel) hasIconLabel = (node as HTMLElement).hasAttribute('label');
if (!hasIconLabel) hasIconLabel = (node as HTMLElement).label !== undefined;
}
// Concatenate text nodes