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

Duplicate labels used error when two buttons perform the same function #34

Open
scardamalias opened this issue Apr 25, 2023 · 1 comment

Comments

@scardamalias
Copy link

scardamalias commented Apr 25, 2023

Describe the bug

On forms which may be potentially long, we have a Search (submit) button at the top and bottom of the form. See sample code below (just one field is used for the reproduction). ARC Toolkit returns a "Duplicate labels used" error.

I'm guessing this check is to protect against the inadvertent use of the same label to execute different functions, but it doesn't allow for the deliberate case where functionality is duplicated. Obviously it's not possible for ARC to determine whether the two buttons have the same functionality or not, but I'd expect more of an advisory finding than an error.

From https://www.w3.org/TR/WCAG22/#consistent-identification:

Components that have the same functionality within a set of Web pages are identified consistently.

Perhaps "set of web pages" does not technically include my scenario but it doesn't seem that different in practice. Two controls, same functionality, identified consistently.

To Reproduce

<!DOCTYPE html>
<html lang="en">
    <head><title>duplicate label test</title></head>
    <body>
        <form>
            <input type="submit" value="Search" />

            <label for="criteria1">First Name</label>
            <input id="criteria1" name="criteria1" type="text" value="" />
            ... many more possible criteria fields here ...

            <input type="submit" value="Search" />
        </form>
    </body>
</html>

Expected behavior

A warning about duplicate labels, not an error.

Version information

  • Browser and version: Chrome 112.0.5615.137, OSX 13.3.1
  • ARC Toolkit version: 5.5.3

Thank you!

Edit: wrap sample code in a code block.

@stevefaulkner
Copy link

@scardamalias thanks for raising the issue, will review

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

No branches or pull requests

2 participants