From 7a3c3b93c31a248a4a0b3ec4921b070900b7f4d5 Mon Sep 17 00:00:00 2001 From: Konstantin Gogov Date: Fri, 31 Oct 2025 15:43:47 +0200 Subject: [PATCH] fix(ui5-dynamic-page-title): correct ARIA attribute handling for non-interactive titles When the DynamicPageTitle is non-interactive, the ARIA labelledby attribute should not reference any heading elements. This change ensures that the _ariaLabelledBy getter returns undefined when the title is not interactive, preventing potential accessibility issues. Fixes: #12466 --- packages/fiori/src/DynamicPageTitle.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/fiori/src/DynamicPageTitle.ts b/packages/fiori/src/DynamicPageTitle.ts index 38baea29ea7e..12493d0eef92 100644 --- a/packages/fiori/src/DynamicPageTitle.ts +++ b/packages/fiori/src/DynamicPageTitle.ts @@ -276,6 +276,10 @@ class DynamicPageTitle extends UI5Element { } get _ariaLabelledBy() { + if (!this.interactive) { + return undefined; + } + const hasAnyHeading = this[this.headingSlotName].length; if (hasAnyHeading) { return `${this._id}-heading`;