From 1c43df2b89725f40f9712d915772344d635b5117 Mon Sep 17 00:00:00 2001 From: PetyaMarkovaBogdanova Date: Wed, 20 May 2026 09:57:08 +0300 Subject: [PATCH 1/3] fix(ui5-breadcrumbs): fix acc finding --- packages/main/src/Breadcrumbs.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/main/src/Breadcrumbs.ts b/packages/main/src/Breadcrumbs.ts index bd65f065d1fa..c44bcd3d43fc 100644 --- a/packages/main/src/Breadcrumbs.ts +++ b/packages/main/src/Breadcrumbs.ts @@ -662,7 +662,9 @@ class Breadcrumbs extends UI5Element implements IToolbarItemContent { } get _accessibleNameText() { - return Breadcrumbs.i18nBundle.getText(BREADCRUMBS_ARIA_LABEL); + const baseLabel = Breadcrumbs.i18nBundle.getText(BREADCRUMBS_ARIA_LABEL); + const currentLocation = this._currentLocationText; + return currentLocation ? `${baseLabel} ${currentLocation}` : baseLabel; } get _dropdownArrowAccessibleNameText() { From e83748687fcef140b27652795d6214ea67c184d3 Mon Sep 17 00:00:00 2001 From: PetyaMarkovaBogdanova Date: Wed, 10 Jun 2026 17:28:04 +0300 Subject: [PATCH 2/3] fix(ui5-breadcrumbs): add accessibleName property to Breadcrumbs component --- .../main/cypress/specs/Breadcrumbs.cy.tsx | 31 +++++++++++++++++++ packages/main/src/Breadcrumbs.ts | 13 ++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/packages/main/cypress/specs/Breadcrumbs.cy.tsx b/packages/main/cypress/specs/Breadcrumbs.cy.tsx index 30ab14723cd1..11a616dd1932 100644 --- a/packages/main/cypress/specs/Breadcrumbs.cy.tsx +++ b/packages/main/cypress/specs/Breadcrumbs.cy.tsx @@ -1155,4 +1155,35 @@ describe("BreadcrumbsItem click event", () => { expect(itemClickFired).to.be.false; }); }); +}); + +describe("Breadcrumbs - accessibleName property", () => { + it("uses the default 'Breadcrumb Trail' label when accessibleName is not set", () => { + cy.mount( + + Link1 + Location + + ); + + cy.get("[ui5-breadcrumbs]") + .shadow() + .find(".ui5-breadcrumbs-root") + .should("have.attr", "aria-label", "Breadcrumb Trail"); + }); + + it("reflects accessibleName on the nav element's aria-label", () => { + cy.mount( + + Link1 + Location + + ); + + cy.get("[ui5-breadcrumbs]") + .shadow() + .find(".ui5-breadcrumbs-root") + .should("have.attr", "aria-label", "My Custom Breadcrumbs"); + }); +}); }); \ No newline at end of file diff --git a/packages/main/src/Breadcrumbs.ts b/packages/main/src/Breadcrumbs.ts index c44bcd3d43fc..0e38e6fb1435 100644 --- a/packages/main/src/Breadcrumbs.ts +++ b/packages/main/src/Breadcrumbs.ts @@ -135,6 +135,15 @@ class Breadcrumbs extends UI5Element implements IToolbarItemContent { @property() separators: `${BreadcrumbsSeparator}` = "Slash"; + /** + * Defines the accessible name of the component. + * @default undefined + * @public + * @since 2.22.0 + */ + @property() + accessibleName?: string; + /** * Holds the number of items in the overflow. * @default 0 @@ -662,9 +671,7 @@ class Breadcrumbs extends UI5Element implements IToolbarItemContent { } get _accessibleNameText() { - const baseLabel = Breadcrumbs.i18nBundle.getText(BREADCRUMBS_ARIA_LABEL); - const currentLocation = this._currentLocationText; - return currentLocation ? `${baseLabel} ${currentLocation}` : baseLabel; + return this.accessibleName || Breadcrumbs.i18nBundle.getText(BREADCRUMBS_ARIA_LABEL); } get _dropdownArrowAccessibleNameText() { From 4dbd2e2be20299e4d8d14f2ed3c56b611bf49a49 Mon Sep 17 00:00:00 2001 From: PetyaMarkovaBogdanova Date: Wed, 10 Jun 2026 17:34:52 +0300 Subject: [PATCH 3/3] fix(ui5-breadcrumbs): fixed typo --- packages/main/cypress/specs/Breadcrumbs.cy.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/main/cypress/specs/Breadcrumbs.cy.tsx b/packages/main/cypress/specs/Breadcrumbs.cy.tsx index 11a616dd1932..370f59924483 100644 --- a/packages/main/cypress/specs/Breadcrumbs.cy.tsx +++ b/packages/main/cypress/specs/Breadcrumbs.cy.tsx @@ -1185,5 +1185,4 @@ describe("Breadcrumbs - accessibleName property", () => { .find(".ui5-breadcrumbs-root") .should("have.attr", "aria-label", "My Custom Breadcrumbs"); }); -}); }); \ No newline at end of file