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 require-input-label to allow inputs within a <label> to have an id attribute #1994

Merged
merged 3 commits into from
Jun 10, 2021

Conversation

MelSumner
Copy link
Contributor

If merged, this PR resolves the issue where a form element nested inside of a <label> element was throwing a invalid "multiple labels" error if the form element also had an id attribute.

Details:

  • Added condition to allow <label>text<input id="foo" /></label>.
  • Updated tests to include additional valid scenarios.

Please consider using conventional comments when reviewing this PR.

@MelSumner MelSumner requested a review from rwjblue June 10, 2021 17:47
@rwjblue rwjblue enabled auto-merge June 10, 2021 17:53
@rwjblue rwjblue added the bug label Jun 10, 2021
@rwjblue rwjblue changed the title Resolves incorrectly reported multiple label issue Allow form elements within a <label> to have an id attribute Jun 10, 2021
@rwjblue rwjblue changed the title Allow form elements within a <label> to have an id attribute Fix require-input-label to allow inputs within a <label> to have an id attribute Jun 10, 2021
@rwjblue rwjblue disabled auto-merge June 10, 2021 17:54
@rwjblue rwjblue enabled auto-merge June 10, 2021 17:54
@rwjblue rwjblue merged commit de0505d into master Jun 10, 2021
@rwjblue rwjblue deleted the melsumner/require-input-label-bug branch June 10, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants