question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

False Positive: Multiple <label>s marked as errors

See original GitHub issue

Expectation: For a field with with multiple <label> elements, Axe flags it as a warning (using should language).

Actual: When Axe encounters a field with with multiple <label> elements, it flags this as an error (using must language).

Motivation: Because it generates false positives.

To Reproduce:

  1. Go to https://s.codepen.io/aardrian/debug/WVJvjM
  2. Inspect the page with Axe extension.
  3. View the Violations found column.

Sample Code:

<form>
  <label for="a">ham</label>
  <input type="text" id="a">
  <label for="a">bone</label>
</form>

Why Axe Does This: The Deque page explaining this rule confirms this is considered a failure, suggesting this is not a software bug:

  • Statement: “Form fields do not have duplicate labels”
  • Statement: “Ensure that only one label is assigned to a form field.”
  • The following compliance data is included on the page:

Requirement(s)

  • WCAG 2.1 (A): MUST
  • WCAG 2.0 (A): MUST
  • Section 508: MUST

WCAG Success Criteria

  • 3.3.2 Labels or Instructions

Section 508 Guidelines

  • 1194.22 (n) Information required to complete electronic forms online

Why I Think Axe Should Not:

Testing tool comparison: The three tools I see most in use all flag this as an error.

  • Axe: must implies error: “Form field must not have multiple label elements” (as 3.3.2),
  • WAVE: Error: “A form control has more than one label associated with it.” (as 1.1.1, 1.3.1, 2.4.6, 3.3.2),
  • ARC: “Error: multiple form labels used”.

Alternate Outcome: You tell me I am a wrong wrongerson and tell me to bugger off.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jeeyyycommented, Mar 16, 2020
0reactions
strakercommented, Mar 11, 2020

Sorry @patrickhulce, I must have missed your comment. Reopening the ticket and we’ll update the docs to use should (thanks @AutoSponge for commenting so I found this again)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multiclass Classification Model Evaluation - Parasite ID
False Positives ( FP ): Items where the true label is negative and whose class is incorrectly predicted to be positive .
Read more >
require-input-label: "Multiple labels" false positive · Issue #2141
This case should not trigger the "form elements should not have multiple labels" error, because the id could be used for things other...
Read more >
Precision, Recall, Accuracy, and F1 Score for Multi-Label ...
False positives, also known as Type I errors. This is when a classifier predicts a label that does not exist in the input...
Read more >
True vs. False and Positive vs. Negative | Machine Learning
A false positive is an outcome where the model incorrectly predicts the positive class.
Read more >
Confusion Matrix for Multi-Class Classification - Analytics Vidhya
Confusion Matrix has 4 terms to understand True Positive(TP),False Positive(FP),True Negative(TN) and False Negative(FN).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found