Skip to content

Commit ddbb8d4

Browse files
authored
fix(ui5-dynamic-page-title): correct ARIA attribute handling for non-interactive titles (#12598)
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
1 parent a4f4dd5 commit ddbb8d4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/fiori/src/DynamicPageTitle.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ class DynamicPageTitle extends UI5Element {
276276
}
277277

278278
get _ariaLabelledBy() {
279+
if (!this.interactive) {
280+
return undefined;
281+
}
282+
279283
const hasAnyHeading = this[this.headingSlotName].length;
280284
if (hasAnyHeading) {
281285
return `${this._id}-heading`;

0 commit comments

Comments
 (0)