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

fix(lint): fix false-positives for aria-label and report cases where the role is implicit in noSvgWithoutTitle #788

Merged
merged 6 commits into from
Nov 19, 2023

Conversation

unvalley
Copy link
Member

@unvalley unvalley commented Nov 19, 2023

Summary

Closes #784
This PR does

  • fix false-positives for aria-label. It does not require that title children having id.
  • reports when <svg>'s role attribute is implicit (empty)
    • e.g. <svg role=""> is invalid if there is no <title> in child.

Test Plan

Added some test cases

  • to accept aria-label without inner element's id consistency
  • to report the case if svg's role attribute is implicit

… report cases where the role is other than img
@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Nov 19, 2023
@github-actions github-actions bot added A-Website Area: website A-Changelog Area: changelog labels Nov 19, 2023
@unvalley unvalley marked this pull request as draft November 19, 2023 17:20
@unvalley unvalley changed the title fix(lint): fix false-positives for aria-label and report cases where the role is other than img in noSvgWithoutTitle fix(lint): fix false-positives for aria-label and report cases where the role is implicit in noSvgWithoutTitle Nov 19, 2023
@unvalley unvalley marked this pull request as ready for review November 19, 2023 17:33
@unvalley unvalley requested review from a team November 19, 2023 17:48
@Conaclos Conaclos merged commit bb16142 into biomejs:main Nov 19, 2023
14 checks passed
@unvalley unvalley deleted the fix-no-svg-without-title branch November 19, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Linter Area: linter A-Website Area: website L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistency in lint/a11y/noSvgWithoutTitle Lint Rule for aria-label and aria-labelledby
2 participants