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