mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(action-sheet): button icons are not announced by screen readers (#26640)
This commit is contained in:
@ -287,7 +287,7 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
|||||||
{buttons.map((b) => (
|
{buttons.map((b) => (
|
||||||
<button type="button" id={b.id} class={buttonClass(b)} onClick={() => this.buttonClick(b)}>
|
<button type="button" id={b.id} class={buttonClass(b)} onClick={() => this.buttonClick(b)}>
|
||||||
<span class="action-sheet-button-inner">
|
<span class="action-sheet-button-inner">
|
||||||
{b.icon && <ion-icon icon={b.icon} lazy={false} class="action-sheet-icon" />}
|
{b.icon && <ion-icon icon={b.icon} aria-hidden="true" lazy={false} class="action-sheet-icon" />}
|
||||||
{b.text}
|
{b.text}
|
||||||
</span>
|
</span>
|
||||||
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||||
@ -299,7 +299,9 @@ export class ActionSheet implements ComponentInterface, OverlayInterface {
|
|||||||
<div class="action-sheet-group action-sheet-group-cancel">
|
<div class="action-sheet-group action-sheet-group-cancel">
|
||||||
<button type="button" class={buttonClass(cancelButton)} onClick={() => this.buttonClick(cancelButton)}>
|
<button type="button" class={buttonClass(cancelButton)} onClick={() => this.buttonClick(cancelButton)}>
|
||||||
<span class="action-sheet-button-inner">
|
<span class="action-sheet-button-inner">
|
||||||
{cancelButton.icon && <ion-icon icon={cancelButton.icon} lazy={false} class="action-sheet-icon" />}
|
{cancelButton.icon && (
|
||||||
|
<ion-icon icon={cancelButton.icon} aria-hidden="true" lazy={false} class="action-sheet-icon" />
|
||||||
|
)}
|
||||||
{cancelButton.text}
|
{cancelButton.text}
|
||||||
</span>
|
</span>
|
||||||
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
{mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
|
||||||
|
|||||||
Reference in New Issue
Block a user