Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: item and card buttons should inherit aria-label attribute #25885

Closed
4 of 7 tasks
DeyBo opened this issue Sep 6, 2022 · 6 comments
Closed
4 of 7 tasks

bug: item and card buttons should inherit aria-label attribute #25885

DeyBo opened this issue Sep 6, 2022 · 6 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@DeyBo
Copy link

DeyBo commented Sep 6, 2022

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

Hi !

I saw that there are already some components that reflect aria-label property on their native element (i.e. ion-button).
In my case, I use ion-card and ion-item. Sometimes, I set button to true for these, but my custom aria-label is not extended to native button.

Expected Behavior

I wanted to know if it is possible to use aria-label with another way ?
Or maybe make it possible to extend aria-label to native button when ion-item and ion-card has button to true ?

Steps to Reproduce

To see it, you can use ion-item or ion-card with button property to true. Set a custom aria-label to your ion-item or ion-card and check accessibility name.

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 6.0.9
@angular-devkit/build-angular : 13.3.9
@angular-devkit/schematics : 12.2.15
@angular/cli : 13.1.4
@ionic/angular-toolkit : 5.0.3

Capacitor:

Capacitor CLI : 2.4.7
@capacitor/core : 2.4.7

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v16.15.1 (/usr/local/bin/node)
npm : 8.12.1
OS : macOS Monterey

Additional Information

Thanks and sorry for my medium english !

@ionitron-bot ionitron-bot bot added the triage label Sep 6, 2022
@liamdebeasi liamdebeasi changed the title bug: aria-label is not extended to ion-item and ion-card native button bug: item and card buttons should inherit aria-label attribute Sep 16, 2022
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Sep 16, 2022
@ionitron-bot ionitron-bot bot removed the triage label Sep 16, 2022
@sean-perkins
Copy link
Contributor

Hello @DeyBo! Can you try with this dev-build and let me know if you run into any issues?

npm install @ionic/[email protected]

In this build any aria-label specified on the host of ion-item or ion-card when using button, will be reflected to the inner button.

@DeyBo
Copy link
Author

DeyBo commented Sep 28, 2022

Hello @sean-perkins !

It seams that it's adding "arialabel" and not "aria-label" so it doesn't work properly for web accessibility.

There is some screenshots of Firefox Devtools to illustrate !

What it does :
DOM view
SCR-20220928-ciu
Accessibility view
SCR-20220928-cjc

What it should do :
DOM view
SCR-20220928-cmb
Accessibility view
SCR-20220928-cjs

Thank you very much for your time !

@sean-perkins
Copy link
Contributor

@DeyBo thanks for testing and confirming that problem. It would definitely help if I had assigned to the correct key!

Here is an updated dev-build that assigns to aria-label, not ariaLabel.

npm install @ionic/[email protected] 

@DeyBo
Copy link
Author

DeyBo commented Sep 29, 2022

Thank you very much @sean-perkins !
It's working very well !

@sean-perkins
Copy link
Contributor

This will be available in the next patch release of Ionic.

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 9, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

3 participants