Inconsistency in lint/a11y/noSvgWithoutTitle
Lint Rule for aria-label and aria-labelledby
#784
Closed
1 task done
Labels
A-Linter
Area: linter
L-JavaScript
Language: JavaScript and super languages
S-Bug-confirmed
Status: report has been confirmed as a valid bug
S-Help-wanted
Status: you're familiar with the code base and want to help the project
Environment information
What happened?
I've encountered an issue with the lint/a11y/noSvgWithoutTitle lint rule, where the behavior of aria-label is incorrectly matching that of aria-labelledby. While aria-label can be used independently, aria-labelledby requires specifying an ID.
Current: Incorrect
Error Occurs
No Error Occurs
Expected
No Error Should Occur with aria-label Specified Alone
Rule name
lint/a11y/noSvgWithoutTitle
Playground link
https://biomejs.dev/playground?code=PABkAGkAdgA%2BAAoAIAAgADwAaAAyAD4AQQBjAHQAdQBhAGwAbAB5ACAAdgBhAGwAaQBkADwALwBoADIAPgAKACAAIAAKACAAIAA8AHMAdgBnACAAcgBvAGwAZQA9ACIAaQBtAGcAIgAgAGEAcgBpAGEALQBsAGEAYgBlAGwAPQAiAHMAYQBtAHAAbABlACIAPgAKACAAIAAgACAAPABzAHAAYQBuAD4AcABhAHMAcwA8AC8AcwBwAGEAbgA%2BAAoAIAAgADwALwBzAHYAZwA%2BAAoAIAAgAAoAIAAgADwAcwB2AGcACgAgACAAIAAgAHIAbwBsAGUAPQAiAGkAbQBnACIACgAgACAAIAAgAGEAcgBpAGEALQBsAGEAYgBlAGwAbABlAGQAYgB5AD0AIgB0AGkAdABsAGUAIgAKACAAIAA%2BAAoAIAAgACAAIAAgACAAPABzAHAAYQBuACAAaQBkAD0AIgB0AGkAdABsAGUAIgA%2BAHAAYQBzAHMAPAAvAHMAcABhAG4APgAKACAAIAA8AC8AcwB2AGcAPgAKAAoAIAAgADwAcwBwAGEAbgA%2BAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtAC0ALQAtADwALwBzAHAAYQBuAD4ACgAgACAACgAgACAAPABoADIAPgBBAGMAdAB1AGEAbABsAHkAIABpAG4AdgBhAGwAaQBkADwALwBoADIAPgAKACAAIAA8AHAAPgBUAGgAZQAgAGwAYQBiAGUAbAAgAHMAaABvAHUAbABkACAAYgBlACAAJwBwAGEAcwBzACcAIABiAHUAdAAgAGkAdAAgAGIAZQBjAG8AbQBlAHMAIAAnAHQAaQB0AGwAZQAnAC4APAAvAHAAPgAKACAAIAAKACAAIAA8AHMAdgBnAAoAIAAgACAAIAByAG8AbABlAD0AIgBpAG0AZwAiAAoAIAAgACAAIABhAHIAaQBhAC0AbABhAGIAZQBsAD0AIgB0AGkAdABsAGUAIgAKACAAIAA%2BAAoAIAAgACAAIAA8AHMAcABhAG4AIABpAGQAPQAiAHQAaQB0AGwAZQAiAD4AcABhAHMAcwA8AC8AcwBwAGEAbgA%2BAAoAIAAgADwALwBzAHYAZwA%2BAAoACgAgACAACgA8AC8AZABpAHYAPgA%3D
Expected result
The aria-label can be used on its own.
An error should not occur when only aria-label is used.
Code of Conduct
The text was updated successfully, but these errors were encountered: