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

fixrule (input_label_visible) should not trigger when button input contains visible text #2183

Open
philljenkins opened this issue Feb 4, 2025 · 1 comment
Assignees
Labels
Carbon Carbon related issue engine Issues in the accessibility-checker-engine component user-reported Issues identified outside of the core team

Comments

@philljenkins
Copy link
Contributor

philljenkins commented Feb 4, 2025

The original violation in #2122 is correctly no longer triggering.

However, I'm seeing a couple "Needs Review" issues that should not trigger on this Carbon AI page
AILabel component

DOM:

<button 
   aria-expanded="false" aria-controls="id-:r4m:" aria-label="AI Show information" 
   type="button" 
   class="cds--toggletip-button cds--ai-label__button cds--ai-label__button--mini cds--ai-label__button--default">
      <span class="cds--ai-label__text">AI</span>
</button>
  1. The text "AI" is correctly part of the button and is displayed, but the rule still triggers.
  2. Checker rule input_label_visible is incorrectly reporting against two requirements (SCs). It seems that the single potential reason is triggered, but reported twice. I think neither should be reported:
    • 2.5.3 Label in Name: Needs review: The input element does not have an associated visible label
    • 3.3.2 Labels or Instructions: Needs review: The input element does not have an associated visible label

Image

Triggered by

Rule ID: input_label_visible[file not changed in the PR #2170 ]
Reason ID: potential_no_label

rulesets: [{
        "id": ["IBM_Accessibility", "IBM_Accessibility_next", "WCAG_2_1", "WCAG_2_0", "WCAG_2_2"],
        "num": ["2.5.3", "3.3.2"], //map to both requirements in help
        "level": eRulePolicy.VIOLATION,
        "toolkitLevel": eToolkitLevel.LEVEL_ONE

Image

@philljenkins
Copy link
Contributor Author

philljenkins commented Feb 4, 2025

Use this test case to reproduce
Use the following button HTML structure in this URL https://cr2463.csb.app/
A button with text should not require another visible text label.

Triggered by
Rule ID: input_label_visible[file not changed in the PR https://github.com//pull/2170 ]
Reason ID: potential_no_label

After rule fixed in #2146, violation is correctly no longer triggered on 1st example, however, a violation is now incorrectly triggered on 2nd example that was previously not triggered:

Image

before rule fixed in #2146, violation is incorrectly triggered, but not triggered on 2nd correct example:

Image

@philljenkins philljenkins added engine Issues in the accessibility-checker-engine component Carbon Carbon related issue user-reported Issues identified outside of the core team labels Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Carbon Carbon related issue engine Issues in the accessibility-checker-engine component user-reported Issues identified outside of the core team
Projects
None yet
Development

No branches or pull requests

2 participants