diff --git a/packages/fiori/cypress/specs/SideNavigation.cy.tsx b/packages/fiori/cypress/specs/SideNavigation.cy.tsx index 477a81fba232..4cc2a4610432 100644 --- a/packages/fiori/cypress/specs/SideNavigation.cy.tsx +++ b/packages/fiori/cypress/specs/SideNavigation.cy.tsx @@ -1598,4 +1598,131 @@ describe("Focusable items", () => { .find(".ui5-sn-item-external-link-icon") .should("exist"); }); + + it("Tests accessibleName for SideNavigationItem", () => { + cy.mount( + + + + + + ); + + cy.get("#item1") + .shadow() + .find(".ui5-sn-item") + .should("have.attr", "aria-label", "Navigate to Home Page"); + + cy.get("#subItem1") + .shadow() + .find(".ui5-sn-item") + .should("have.attr", "aria-label", "User Profile Settings"); + }); + + it("Tests accessibleName for SideNavigationItem in collapsed mode", () => { + cy.mount( + + + ); + + cy.get("#item1") + .shadow() + .find(".ui5-sn-item") + .should("have.attr", "aria-label", "Navigate to Home Page"); + }); + + it("Tests that group element uses accessibleName when provided", () => { + cy.mount( + + + + + + ); + + // Verify parent item uses accessibleName + cy.get("#item1") + .shadow() + .find(".ui5-sn-item") + .should("have.attr", "aria-label", "View and manage team members"); + + // Verify group