diff --git a/framework/core/js/src/common/components/Button.tsx b/framework/core/js/src/common/components/Button.tsx index 991a0b890..86e9ce001 100644 --- a/framework/core/js/src/common/components/Button.tsx +++ b/framework/core/js/src/common/components/Button.tsx @@ -107,7 +107,7 @@ export default class Button ext const { 'aria-label': ariaLabel } = this.attrs; - if (!ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) { + if (this.view === Button.prototype.view && !ariaLabel && !extractText(vnode.children) && !this.element?.getAttribute?.('aria-label')) { fireDebugWarning( '[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read "Button". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name', this.element