From b423ae7c8cd5ef9224167868bccb4ca209512679 Mon Sep 17 00:00:00 2001 From: giuliana Date: Fri, 24 Jan 2025 11:30:04 +0000 Subject: [PATCH] feat(checkbox): change required prop description --- core/src/components.d.ts | 4 ++-- core/src/components/checkbox/checkbox.tsx | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/components.d.ts b/core/src/components.d.ts index 1b083ee765..2d6f41368b 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -644,7 +644,7 @@ export namespace Components { */ "name": string; /** - * If `true`, the user must fill in a value before submitting a form. + * If true, screen readers will announce it as a required field. This property works only for accessibility purposes, it will not prevent the form from submitting if the value is invalid. */ "required": boolean; "setFocus": () => Promise; @@ -5440,7 +5440,7 @@ declare namespace LocalJSX { */ "onIonFocus"?: (event: IonCheckboxCustomEvent) => void; /** - * If `true`, the user must fill in a value before submitting a form. + * If true, screen readers will announce it as a required field. This property works only for accessibility purposes, it will not prevent the form from submitting if the value is invalid. */ "required"?: boolean; /** diff --git a/core/src/components/checkbox/checkbox.tsx b/core/src/components/checkbox/checkbox.tsx index e9771e4f28..dcea4876d7 100644 --- a/core/src/components/checkbox/checkbox.tsx +++ b/core/src/components/checkbox/checkbox.tsx @@ -99,7 +99,9 @@ export class Checkbox implements ComponentInterface { @Prop() alignment?: 'start' | 'center'; /** - * If `true`, the user must fill in a value before submitting a form. + * If true, screen readers will announce it as a required field. This property + * works only for accessibility purposes, it will not prevent the form from + * submitting if the value is invalid. */ @Prop() required = false;