mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 18:54:11 +08:00
fix(checkbox, radio): label is announced once on ios (#26770)
resolves #26769
This commit is contained in:
@ -247,6 +247,21 @@ export class Checkbox implements ComponentInterface {
|
||||
})}
|
||||
>
|
||||
<label class="checkbox-wrapper">
|
||||
{/*
|
||||
The native control must be rendered
|
||||
before the visible label text due to https://bugs.webkit.org/show_bug.cgi?id=251951
|
||||
*/}
|
||||
<input
|
||||
type="checkbox"
|
||||
aria-checked={`${checked}`}
|
||||
disabled={disabled}
|
||||
id={inputId}
|
||||
onChange={this.toggleChecked}
|
||||
onFocus={() => this.onFocus()}
|
||||
onBlur={() => this.onBlur()}
|
||||
ref={(focusEl) => (this.focusEl = focusEl)}
|
||||
{...inheritedAttributes}
|
||||
/>
|
||||
<div
|
||||
class={{
|
||||
'label-text-wrapper': true,
|
||||
@ -260,17 +275,6 @@ export class Checkbox implements ComponentInterface {
|
||||
{path}
|
||||
</svg>
|
||||
</div>
|
||||
<input
|
||||
type="checkbox"
|
||||
aria-checked={`${checked}`}
|
||||
disabled={disabled}
|
||||
id={inputId}
|
||||
onChange={this.toggleChecked}
|
||||
onFocus={() => this.onFocus()}
|
||||
onBlur={() => this.onBlur()}
|
||||
ref={(focusEl) => (this.focusEl = focusEl)}
|
||||
{...inheritedAttributes}
|
||||
/>
|
||||
</label>
|
||||
</Host>
|
||||
);
|
||||
|
Reference in New Issue
Block a user