Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33
Open
Description
For example, I have an<a> tag that is sometimes disabled:
<a :href="disabled?undefined:'https://example.com'" :aria-disabled="disabled" role="link"> maybe disabled</a>
The w3c specification requires arole="link" when it the link is disabled:https://www.w3.org/TR/html-aria/#example-communicate-a-disabled-link-with-aria
But now this plugin does not know that thehref is sometimes not set and reports an error forno-redundant-roles.
I'm not familiar with ESLint plugin development, but I'm wondering if this can be fixed by using type information and checking whether the attribute type can be nullish. Alternatively, maybe there can be an option to treat allv-bind attributes as possibly not satisfying the aria constraint, which does not rely on typing information.
Metadata
Metadata
Assignees
Labels
No labels