Skip to content

Commit ec6ca80

Browse files
authored
fix(ui5-switch): role checkbox is changed to role switch (#4658)
Fixes: #4633
1 parent 1fb6e58 commit ec6ca80

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/main/src/Switch.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div
22
class="ui5-switch-root {{classes.main}}"
3-
role="checkbox"
3+
role="switch"
44
aria-label="{{ariaLabelText}}"
55
aria-checked="{{checked}}"
66
aria-disabled="{{ariaDisabled}}"

packages/main/test/specs/Switch.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ describe("Switch general interaction", async () => {
3131
it("setting accessible-name-ref on the host is reflected on the button tag", async () => {
3232
const switchEl = await browser.$("#switchAccNameRef").shadow$("div");
3333

34+
assert.strictEqual(await switchEl.getAttribute("role"), "switch", "Proper role attribute is set");
3435
assert.strictEqual(await switchEl.getAttribute("aria-label"), "Use GPS location", "Attribute is reflected");
3536
});
3637
});

0 commit comments

Comments
 (0)