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

Adding aria-hidden attribute fails #106

Open
reintroducing opened this issue May 4, 2021 · 4 comments
Open

Adding aria-hidden attribute fails #106

reintroducing opened this issue May 4, 2021 · 4 comments

Comments

@reintroducing
Copy link

Hello,
I'm trying to implement this plugin but it's failing on the following configuration:

{
    name: 'addAttributesToSVGElement',
    params: {
        attributes: [
            {
                fill: 'currentColor',
            },
            {
                'aria-hidden': true,
            },
        ],
    },
},

This produces a console error:
Screen Shot 2021-05-04 at 8 26 38 AM

I also tried this configuration which produces the same thing:

{
    name: 'addAttributesToSVGElement',
    params: {
        attributes: [
            'fill="currentColor"',
            'aria-hidden="true"',
        ],
    },
},

I've taken a look at #33 and #42 which are both marked as fixed by #43 but I'm still seeing the issue present, although its no longer transforming to ariaLabel rather I believe the problem lies in the fact that its trying to use 'aria-label' as the attribute.

Is my configuration incorrect? Or is this an actual issue?

@ljharb
Copy link
Collaborator

ljharb commented May 4, 2021

What about ariaHidden?

@reintroducing
Copy link
Author

@ljharb that produces the following:
Screen Shot 2021-05-04 at 8 41 23 AM

@ljharb
Copy link
Collaborator

ljharb commented May 4, 2021

What about:

        attributes: [
            {
                fill: 'currentColor',
                'aria-hidden': true,
            },
        ],

@reintroducing
Copy link
Author

@ljharb that produces the same error as the original screenshot.

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

No branches or pull requests

2 participants