-
-
Notifications
You must be signed in to change notification settings - Fork 636
Control has associated label #515
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
Control has associated label #515
Conversation
defcc00
to
3544dfd
Compare
98c8398
to
4833376
Compare
Should we enforce a label on |
I'm testing the rule on the FB codebase right now and fine-tuning it. It's over-capturing a little. |
It seems like maybe the default should be to enforce a label on everything, but maybe have an option to ignore input types that aren't that important to label, like canvas/audio/video? |
7d3bf8a
to
cf98d68
Compare
The results from my internal tests look good. About 250 errors over ~70K files. Keep in mind that we've done a TON of work to ferret out unlabelled elements. These represent the ones that we had no signal for. I just need to fill out the |
I'm finding lots of juicy examples where all the rules in the plugin have been followed except that the element doesn't have a label. This is the last step! |
38f9fbc
to
a3fa108
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems great. It'd be ideal to rebase this first, so there's no merge commits, but otherwise let's merge, and cut a minor release :-D
ca14de5
to
5650674
Compare
@jessebeach Wasn't sure if I should open an issue for this but this PR adds |
Hey @jessebeach ! I was looking through some of the rules that exist and I noticed that this rule isn't enabled for either recommended or strict. Was that intended? I mostly ask because the Airbnb config uses it and I was surprised it wasn't listed on the README as an available rule |
@backwardok adding a new rule to a builtin config is a breaking change, so it's planned for whenever we end up doing a semver-major bump. |
This rule is the inverse of
label-has-associated-control
.Check the Markdown file for details of the rule.
It's intended to catch unlabelled buttons, checkboxes, radios, menuitems, options, etc. I did a bunch of QA work to finagle the configs so that the output is actionable.
The danger here is that we encourage developers to put labels on things like containers, which really shouldn't be labelled. The exceptions to that rule are dialogs and alerts, but I opened a new issue to write a rule for those: #516
There really isn't a difference between the behavior of recommended and strict, so I made the configs the same for both.