Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui5-card): fix accessibiity role position #10437

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GerganaKremenska
Copy link
Member

FIX: #10367

@@ -124,6 +124,28 @@ describe("CardHeader", () => {
assert.strictEqual(await header2.getAttribute("aria-labelledby"), EXPECTED_ARIA_LABELLEDBY_HEADER2,
"The aria-labelledby is correctly set.");
});

it("test interactive card header accessibility role", async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's write these tests in Cypress, as we are going to nevertheless migrate all the wdio tests to Cypress.

cy.get("#cardHeader1")
.shadow()
.find(".ui5-card-header-focusable-element")
.should("have.attr", "role", "button");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can combine these assertions as they are called on the same element

cy.get("#cardHeader1")
		.shadow()
		.find(".ui5-card-header-focusable-element")
		.should("have.attr", "role", "button")
		.and("have.attr", "tabindex", "0")
		.and("have.attr", "aria-roledescription", "Interactive Card Header");

Same for the second test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ui5-card-header]: The focusable DIV lacks a role attribute.
2 participants