mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
fix(checkbox): screen readers announce state correctly (#26817)
resolves #25740
This commit is contained in:
@ -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}
|
||||||
|
Reference in New Issue
Block a user