From 42c43285da78f8b720b744fce5ad96a7d0b3b514 Mon Sep 17 00:00:00 2001 From: Georgi Damyanov Date: Wed, 3 Dec 2025 13:39:27 +0200 Subject: [PATCH 1/3] fix: update role property value --- packages/main/cypress/specs/Button.cy.tsx | 4 ++++ packages/main/src/Button.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/main/cypress/specs/Button.cy.tsx b/packages/main/cypress/specs/Button.cy.tsx index b0dc10aa84eb5..3e4be6b648654 100644 --- a/packages/main/cypress/specs/Button.cy.tsx +++ b/packages/main/cypress/specs/Button.cy.tsx @@ -8,6 +8,8 @@ import employee from "@ui5/webcomponents-icons/dist/employee.js"; import { BUTTON_ARIA_TYPE_EMPHASIZED, + BUTTON_ROLE_DESCRIPTION, + LINK_ROLE_DESCRIPTION, } from "../../src/generated/i18n/i18n-defaults.js"; describe("Button general interaction", () => { @@ -589,6 +591,7 @@ describe("Accessibility", () => { expect(info.description).to.include("Submit form"); expect(info.description).to.include(Button.i18nBundle.getText(BUTTON_ARIA_TYPE_EMPHASIZED)); expect(info.role).to.equal("button"); + expect(info.type).to.equal(Button.i18nBundle.getText(BUTTON_ROLE_DESCRIPTION)); expect(info.disabled).to.be.false; }); }); @@ -602,6 +605,7 @@ describe("Accessibility", () => { const info = button.accessibilityInfo; expect(info.role).to.equal("link"); + expect(info.type).to.equal(Button.i18nBundle.getText(LINK_ROLE_DESCRIPTION)); expect(info.disabled).to.be.true; expect(info.description).to.be.undefined; }); diff --git a/packages/main/src/Button.ts b/packages/main/src/Button.ts index 4a771405a940a..10c76ff25fe89 100644 --- a/packages/main/src/Button.ts +++ b/packages/main/src/Button.ts @@ -671,11 +671,11 @@ class Button extends UI5Element implements IButton { } get effectiveAccRoleTranslation(): string { - if (this.role === ButtonAccessibleRole.Button) { + if (this.accessibleRole === ButtonAccessibleRole.Button) { return Button.i18nBundle.getText(BUTTON_ROLE_DESCRIPTION); } - if (this.role === ButtonAccessibleRole.Link) { + if (this.accessibleRole === ButtonAccessibleRole.Link) { return Button.i18nBundle.getText(LINK_ROLE_DESCRIPTION); } From 65bab61226806129fa7d284c1378ecfe8f659f90 Mon Sep 17 00:00:00 2001 From: Georgi Damyanov Date: Wed, 3 Dec 2025 14:00:47 +0200 Subject: [PATCH 2/3] fix: lint errors --- packages/main/src/Button.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/main/src/Button.ts b/packages/main/src/Button.ts index 10c76ff25fe89..9dc49b0bbb108 100644 --- a/packages/main/src/Button.ts +++ b/packages/main/src/Button.ts @@ -671,11 +671,11 @@ class Button extends UI5Element implements IButton { } get effectiveAccRoleTranslation(): string { - if (this.accessibleRole === ButtonAccessibleRole.Button) { + if (this.accessibleRole as ButtonAccessibleRole === ButtonAccessibleRole.Button) { return Button.i18nBundle.getText(BUTTON_ROLE_DESCRIPTION); } - if (this.accessibleRole === ButtonAccessibleRole.Link) { + if (this.accessibleRole as ButtonAccessibleRole === ButtonAccessibleRole.Link) { return Button.i18nBundle.getText(LINK_ROLE_DESCRIPTION); } From 206feaec99ec51de73245f91bcace413ac3e4e76 Mon Sep 17 00:00:00 2001 From: Georgi Damyanov Date: Fri, 5 Dec 2025 11:00:52 +0200 Subject: [PATCH 3/3] fix: fix tests --- packages/main/cypress/specs/TableCustomAnnouncement.cy.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/main/cypress/specs/TableCustomAnnouncement.cy.tsx b/packages/main/cypress/specs/TableCustomAnnouncement.cy.tsx index d9c9658ad7a24..50938df5b3518 100644 --- a/packages/main/cypress/specs/TableCustomAnnouncement.cy.tsx +++ b/packages/main/cypress/specs/TableCustomAnnouncement.cy.tsx @@ -84,6 +84,7 @@ describe("Cell Custom Announcement - More details", () => { } cy.get("body").then($body => { + debugger; expect($body.find("#ui5-table-invisible-text").text()).to.equal(expectedText); }); } @@ -126,7 +127,7 @@ describe("Cell Custom Announcement - More details", () => { checkAnnouncement(CONTAINS_CONTROL, true); cy.realPress("ArrowRight"); // fourth cell focused - checkAnnouncement(`Row1Cell3 . ${CONTAINS_CONTROL}`); + checkAnnouncement(`Button Row1Cell3 . ${CONTAINS_CONTROL}`); cy.focused().should("have.attr", "aria-colindex", "5") .should("have.attr", "role", "gridcell");