Skip to content

Commit

Permalink
fix(back-button): screen readers correctly announce the back button t…
Browse files Browse the repository at this point in the history
…ext (#21053)

fixes #21043
  • Loading branch information
liamdebeasi committed Apr 27, 2020
1 parent 66e8e64 commit 14c226c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/components/back-button/back-button.tsx
Expand Up @@ -126,10 +126,10 @@ export class BackButton implements ComponentInterface, ButtonInterface {
'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">
{backButtonIcon && <ion-icon icon={backButtonIcon} lazy={false} part="icon"></ion-icon>}
{backButtonText && <span class="button-text" part="text">{backButtonText}</span>}
{backButtonIcon && <ion-icon icon={backButtonIcon} aria-hidden="true" lazy={false} part="icon"></ion-icon>}
{backButtonText && <span aria-hidden="true" class="button-text" part="text">{backButtonText}</span>}
</span>
{mode === 'md' && <ion-ripple-effect type={this.rippleType}></ion-ripple-effect>}
</button>
Expand Down

0 comments on commit 14c226c

Please sign in to comment.