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

Merged
merged 3 commits into from
Jan 22, 2025
Merged

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

@github-actions github-actions bot added the Stale label Jan 18, 2025
@GerganaKremenska GerganaKremenska merged commit c9d7f3f into main Jan 22, 2025
10 checks passed
@GerganaKremenska GerganaKremenska deleted the card_acc_fix branch January 22, 2025 16:33
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.7.0-rc.1 🎉

The release is available on v2.7.0-rc.1

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

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