ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51k stars 13.52k forks source link

bug: unable to customize attributes on ion-select-option #22917

Open mastergogo opened 3 years ago

mastergogo commented 3 years ago

Ionic version: 5.x

Current behavior: Unable to set aria-label attribute on ion-select-option since ionic changes the ion-select element to custom markup before rendering.

Expected behavior: We should be able to provide the aria-labels to ion-select-options to enhance a11y.

Please find the working repo here: on-page tab3.vue there is an example

Let me know if more info is needed.

liamdebeasi commented 3 years ago

Thanks for the issue. The problem here is that ion-select-option is not actually rendered in your action sheet when opening ion-select, so anything you provide on ion-select-option will not be passed through other than the defined props.

mastergogo commented 3 years ago

Thanks @liamdebeasi for responding, is there any way to give aria-label to ion-select-options?

liamdebeasi commented 3 years ago

There is no workaround at the moment.