Skip to content

Commit f0507dd

Browse files
committed
feat(ui5-checkbox): implement accessibilityInfo getter
1 parent a856b25 commit f0507dd

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

packages/main/cypress/specs/CheckBox.cy.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,6 @@ describe("Accessibility", () => {
405405
const checkbox = $checkbox[0] as CheckBox;
406406
const accInfo = checkbox.accessibilityInfo;
407407

408-
expect(accInfo.type).to.equal("checkbox");
409-
410408
// Description should come from accessibleName property
411409
expect(accInfo.description).to.equal("Custom Aria Label");
412410

@@ -418,7 +416,6 @@ describe("Accessibility", () => {
418416
});
419417
});
420418

421-
// should provide correct accessibilityInfo description from associated label wits accessibleNameRef
422419
it("should provide correct accessibilityInfo description from accessibleNameRef", () => {
423420
cy.mount(
424421
<>

packages/main/src/CheckBox.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import {
2121
VALUE_STATE_ERROR,
2222
VALUE_STATE_WARNING,
2323
VALUE_STATE_SUCCESS,
24-
FORM_CHECKABLE_REQUIRED,
25-
CHECKBOX_ARIA_TYPE,
24+
FORM_CHECKABLE_REQUIRED
2625
} from "./generated/i18n/i18n-defaults.js";
2726

2827
// Styles
@@ -469,7 +468,6 @@ class CheckBox extends UI5Element implements IFormInputElement {
469468
get accessibilityInfo() {
470469
return {
471470
role: this.accInfo.role,
472-
type: CheckBox.i18nBundle.getText(CHECKBOX_ARIA_TYPE),
473471
description: this.ariaLabelText || this.text || "",
474472
disabled: !!this.accInfo.ariaDisabled,
475473
readonly: !!this.accInfo.ariaReadonly,

packages/main/src/i18n/messagebundle.properties

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ BREADCRUMB_ITEM_POS={0} of {1}
5555
#XACT: ARIA announcement for the breadcrumbs
5656
BREADCRUMBS_ARIA_LABEL=Breadcrumb Trail
5757

58-
#XACT: ARIA announcement for the CheckBox component type
59-
CHECKBOX_ARIA_TYPE=checkbox
60-
6158
#XACT: ARIA announcement for the breadcrumbs overflow button
6259
BREADCRUMBS_OVERFLOW_ARIA_LABEL=More
6360

0 commit comments

Comments
 (0)