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

[label-has-associated-control] Glob format not supporting labelComponents #972

Open
regexyl opened this issue Jan 16, 2024 · 1 comment
Open

Comments

@regexyl
Copy link

regexyl commented Jan 16, 2024

The docs mention that:

Glob format is also supported for specifying names (e.g., Label* matches LabelComponent but not CustomLabel, ????Label matches LinkLabel but not CustomLabel).

It seems like glob matching only occurs for controlComponents, not labelComponents in jsx-a11y/label-has-associated-control, though it seems like (and makes sense) to have it applied to both of them.

@ljharb
Copy link
Member

ljharb commented Jan 16, 2024

I can definitely see both readings (that it applies only to control, and that it applies to both. I think that paragraph needs some splitting up for clarity regardless.

If we can enable glob support on label components in a non-breaking way, then I'm happy to add it.

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

No branches or pull requests

2 participants