diff --git a/packages/ai/cypress/specs/Button.cy.tsx b/packages/ai/cypress/specs/Button.cy.tsx
index b7106c704e2c..4c35e774fa66 100644
--- a/packages/ai/cypress/specs/Button.cy.tsx
+++ b/packages/ai/cypress/specs/Button.cy.tsx
@@ -12,3 +12,73 @@ describe("Initial rendering", () => {
);
});
});
+
+describe("Accessibility", () => {
+ it("should set correct tooltip to right text button", () => {
+ cy.mount(
+
+ );
+
+ cy.get("[ui5-ai-button]")
+ .ui5AIButtonCheckAttributeInTextButton("tooltip", "Generate with Artificial Intelligence");
+ });
+
+ it("should set correct aria-haspopup to SplitButton root element", () => {
+ cy.mount(
+
+ );
+
+ cy.get("[ui5-ai-button]")
+ .ui5AIButtonCheckAttributeSplitButtonRoot("aria-haspopup", "menu");
+ });
+
+ it("should set correct aria-roledescription to SplitButton root element", () => {
+ cy.mount(
+
+ );
+
+ cy.get("[ui5-ai-button]")
+ .ui5AIButtonCheckAttributeSplitButtonRoot("aria-roledescription", "Open Menu");
+ });
+
+ it("should set correct aria-haspopup to arrow button if shown", () => {
+ cy.mount(
+
+ );
+
+ cy.get("[ui5-ai-button]")
+ .ui5AIButtonCheckAttributeInArrowButton("aria-haspopup", "menu");
+ });
+
+ it("should set correct aria attributes with default values when not provided", () => {
+ cy.mount(
+
+ );
+
+ cy.get("[ui5-ai-button]")
+ .as("button");
+
+ cy.get("@button")
+ .ui5AIButtonCheckAttributeSplitButtonRoot("aria-haspopup", "false");
+
+ cy.get("@button")
+ .ui5AIButtonCheckAttributeSplitButtonRoot("aria-roledescription", "Split Button");
+
+ cy.get("@button")
+ .ui5AIButtonCheckAttributeInArrowButton("aria-haspopup", "menu");
+
+ cy.get("@button")
+ .ui5AIButtonCheckAttributeInArrowButton("aria-expanded", "false");
+ });
+});
diff --git a/packages/ai/cypress/support/commands.ts b/packages/ai/cypress/support/commands.ts
index 3d44a956b147..9570783f6a8d 100644
--- a/packages/ai/cypress/support/commands.ts
+++ b/packages/ai/cypress/support/commands.ts
@@ -37,4 +37,15 @@
// }
import "@ui5/cypress-internal/commands.js";
-import "../../../main/cypress/support/commands.js";
\ No newline at end of file
+import "../../../main/cypress/support/commands.js";
+import "./commands/Button.commands.js";
+
+declare global {
+ namespace Cypress {
+ interface Chainable {
+ ui5AIButtonCheckAttributeInTextButton(attrName: string, attrValue: string): Chainable
+ ui5AIButtonCheckAttributeInArrowButton(attrName: string, attrValue: string): Chainable
+ ui5AIButtonCheckAttributeSplitButtonRoot(attrName: string, attrValue: string): Chainable
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/ai/cypress/support/commands/Button.commands.ts b/packages/ai/cypress/support/commands/Button.commands.ts
new file mode 100644
index 000000000000..0ad6e783c346
--- /dev/null
+++ b/packages/ai/cypress/support/commands/Button.commands.ts
@@ -0,0 +1,33 @@
+import Button from "../../../src/Button.js";
+
+Cypress.Commands.add("ui5AIButtonCheckAttributeInTextButton", { prevSubject: true }, (subject: JQuery