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

Closed
philljenkins opened this issue Feb 4, 2025 · 3 comments · May be fixed by #2213 or #2214
Closed

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

philljenkins opened this issue Feb 4, 2025 · 3 comments · May be fixed by #2213 or #2214
Assignees
Labels
Bug Something isn't working Carbon Carbon related issue engine Issues in the accessibility-checker-engine component Ready for QA T70 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
@shunguoy shunguoy added T70 Bug Something isn't working labels Feb 17, 2025
@MHoov MHoov mentioned this issue Feb 20, 2025
@philljenkins
Copy link
Contributor Author

philljenkins commented Feb 25, 2025

Testing on CHROME using Action Artifacts from latest build
fixrule (input_label_visible) fix issues related to visible text on an input element
All branch testing #4254: Pull request #2213 synchronize by shunguoy

and using the Action Artifact
accessibility-checker-extension for Chrome

  • I'm no longer seeing a "Needs Review" issue that should not trigger on this Carbon AI page
    AILabel component

Before fix, Needs Review incorrectly triggered

Image

After fix, Needs Review correctly no longer triggered

Image

@philljenkins
Copy link
Contributor Author

philljenkins commented Feb 25, 2025

Testing on FIREFOX using Action Artifacts from latest build
fixrule (input_label_visible) fix issues related to visible text on an input element
All branch testing #4254: Pull request #2213 synchronize by shunguoy

and using the Action Artifact
accessibility-checker-extension for Firefox

Before fix incorrectly triggers the Needs Review:

  • Needs review The input element does not have an associated visible label Learn more

After fix correctly does not trigger the Needs Review:

  • I'm no longer seeing a "Needs Review" issue that should not trigger on this Carbon AI page
    AILabel component
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Carbon Carbon related issue engine Issues in the accessibility-checker-engine component Ready for QA T70 user-reported Issues identified outside of the core team
Projects
None yet
2 participants