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

<Icon> was created with unknown prop 'aria-hidden' #965

Closed
censys-git opened this issue Mar 17, 2023 · 1 comment · Fixed by #966
Closed

<Icon> was created with unknown prop 'aria-hidden' #965

censys-git opened this issue Mar 17, 2023 · 1 comment · Fixed by #966

Comments

@censys-git
Copy link

I'm new to svelte and using this nice plugin. Using svelte-kit and testing out. When I'm in dev mode I get the warning in the console <Icon> was created with unknown prop 'aria-hidden'. My code is correct (I think?).

<Icon data="{link.icon.data}" class="menu-item-icon {link.icon.name} {group}-icon" aria-hidden="true" />

and when finally embedded in the rendered html:

<svg version="1.1" class="fa-icon menu-item-icon phone header-icon svelte-a5cb43" width="12.571428571428571" height="16" aria-label="" role="presentation" viewBox="0 0 1408 1792" style="">...</svg>

I'm using this as an icon aside text so it is not important for screen-readers since it's strictly a visual presentation. Is this an issue with svelte-awesome, svelte-kit, or my bad coding?

RobBrazier added a commit that referenced this issue Mar 17, 2023
handle additional properties e.g. aria-hidden and pass to svg element
@RobBrazier
Copy link
Owner

this is fixed in version 3.2.0 which should be out shortly - should handle any additional parameters you pass to the <Icon /> element and add them to <svg />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants