mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
fix(back-button): screen readers correctly announce the back button text (#21053)
fixes #21043
This commit is contained in:
@ -126,10 +126,10 @@ export class BackButton implements ComponentInterface, ButtonInterface {
|
|||||||
'show-back-button': showBackButton
|
'show-back-button': showBackButton
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<button type={type} disabled={disabled} class="button-native" part="button">
|
<button type={type} disabled={disabled} class="button-native" part="button" aria-label={backButtonText || 'back'}>
|
||||||
<span class="button-inner">
|
<span class="button-inner">
|
||||||
{backButtonIcon && <ion-icon icon={backButtonIcon} lazy={false} part="icon"></ion-icon>}
|
{backButtonIcon && <ion-icon icon={backButtonIcon} aria-hidden="true" lazy={false} part="icon"></ion-icon>}
|
||||||
{backButtonText && <span class="button-text" part="text">{backButtonText}</span>}
|
{backButtonText && <span aria-hidden="true" class="button-text" part="text">{backButtonText}</span>}
|
||||||
</span>
|
</span>
|
||||||
{mode === 'md' && <ion-ripple-effect type={this.rippleType}></ion-ripple-effect>}
|
{mode === 'md' && <ion-ripple-effect type={this.rippleType}></ion-ripple-effect>}
|
||||||
</button>
|
</button>
|
||||||
|
Reference in New Issue
Block a user