-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ui5-carousel): update roles to match ACC specification
- Loading branch information
Duygu Ramadan
committed
Mar 11, 2025
1 parent
cf79c33
commit 9a3d9b4
Showing
4 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Carousel from "../../src/Carousel.js"; | ||
import Text from "../../src/Text.js"; | ||
|
||
describe("Accessibility", () => { | ||
it("tests carousel aria roles", () => { | ||
cy.mount( | ||
<Carousel id="carousel"> | ||
<Text id="text">Test</Text> | ||
</Carousel> | ||
); | ||
|
||
cy.get("#carousel") | ||
.shadow() | ||
.find(".ui5-carousel-root") | ||
.should("have.attr", "role", "list"); | ||
|
||
cy.get("#carousel") | ||
.shadow() | ||
.find(".ui5-carousel-item") | ||
.should("have.attr", "role", "listitem"); | ||
|
||
cy.get("#carousel") | ||
.shadow() | ||
.find(".ui5-carousel-root") | ||
.should("have.attr", "aria-roledescription", "Carousel"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters