-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Aria label being forced always #710
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
Comments
I have provided a PR #869 |
PR has been merged, I think this issue can now be closed. No label will be generated automatically if
|
I tried setting aria-hidden="true" on all ion-icon but the SVG label is still generated and shown using version 5.5.1. Also adding an aria-label to the icons is not working. Is there something else to do? The behaviour changed between 5.5 and 5.1.0 (in 5.1 there was no text generated). But I need one icon of 5.5 so downgrad is not really an option. We are using ion-icons in an asp.net core application with the following script include:
The icons are added like this (this is the one missing in 5.1): |
What do you mean with "the SVG label" ? Your example is correct, with From the
all good to me. |
aria-hidden="true" will prevent the aria-label of the |
Current workaround 😖
|
As for example
will display "hello" on hover too. |
I'm using ionicon 5.5.1 and my react code is the following |
@MicheleLucini-infobit so yes, I think too that your issue has not to do with OP's issue aka wrong thread. This one seems more related -> #949. Then you workaround is alright. Another one would be to download / adding the icon to your project and removing the Might be worth to submit a dedicated PR or issue. |
Thanks for the issue, closing this to track in #838. |
Hi everyone :)
I have a small issue regarding accessibility using
ion-button
andion-icon
. While using this in combination my screen reader always reads both, even if I'm using aria-hidden on an element.For me, the most semantic would be to see the
ion-button
to be the element which is read by the screen reader, while theion-icon
is ignored.Problem though, is that the
aria-label
is being forced, regardless if I setariaLabel
to false, null or empty, or when usingaria-hidden
. Cause for this behaviour if the following block of code.Of course I love the default
aria-label
in terms of accessibility, however I would like to control it just a little bit better :)I would like to create a PR enabling to either not set a default
aria-label
or disablingaria-label
by setting thearia-hidden
. My suggestion would be using[ariaLabel]="null"
since it would not introduce a new binding.What do you guys think? Agree with my thoughts? Please spare no comments :)
The text was updated successfully, but these errors were encountered: