fix(checkbox): screen readers announce state correctly (#26817)

resolves #25740
This commit is contained in:
Liam DeBeasi
2023-02-20 09:45:27 -05:00
committed by GitHub
parent b00b656637
commit 7312b0696d

View File

@ -234,7 +234,6 @@ export class Checkbox implements ComponentInterface {
return (
<Host
aria-hidden={disabled ? 'true' : null}
class={createColorClasses(color, {
[mode]: true,
'in-item': hostContext('ion-item', el),
@ -253,7 +252,7 @@ export class Checkbox implements ComponentInterface {
*/}
<input
type="checkbox"
aria-checked={`${checked}`}
checked={checked ? true : undefined}
disabled={disabled}
id={inputId}
onChange={this.toggleChecked}