ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

bug: ion-refresher-content, should be able to set aria-label, title or aria-labelledby

Open stianmorsund opened this issue 4 months ago • 3 comments

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

This got my attention due to a failing accessibility test using @axe-core/playwright. So the issue that gets warned about is that progressbars should have accessible labels: https://dequeuniversity.com/rules/axe/4.8/aria-progressbar-name?application=playwright

There appears to be no way to set an accessible label when using the ion-refresher, like so

<ion-content>
    <ion-refresher slot="fixed" (ionRefresh)="refresh()">
      <ion-refresher-content  />
    </ion-refresher>
 </ion-content>

Expected Behavior

Expect to be able to set a title, aria-label or aria-labelledby as recommended here https://ionicframework.com/docs/api/refresher

Steps to Reproduce

Just see any of the demos here https://ionicframework.com/docs/api/refresher and observe that the spinners don't have an accessible name

Code Reproduction URL

No response

Ionic Info

"@ionic/angular": "7.6.6",

Additional Information

No response

stianmorsund avatar Jan 26 '24 14:01 stianmorsund

@stianmorsund Thank you for the issue!

I have verified that this causes a failing status when it comes to web accessibility.

Are you wanting to customize the text that is passed to aria-label,title or aria-labelledby?

thetaPC avatar Jan 31 '24 01:01 thetaPC

@thetaPC Thanks for having a look :) Being able to customize the text would be great, then we can also support translations.

stianmorsund avatar Jan 31 '24 08:01 stianmorsund

@stianmorsund that makes sense. The team will look into this. Thank you again for submitting the issue!

thetaPC avatar Feb 02 '24 16:02 thetaPC