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

[BUG]: label_name_visible bug with off screen content #1889

Open
tombrunet opened this issue Apr 3, 2024 · 2 comments
Open

[BUG]: label_name_visible bug with off screen content #1889

tombrunet opened this issue Apr 3, 2024 · 2 comments
Labels
engine Issues in the accessibility-checker-engine component false-positive Rules incorrectly reporting a violation priority-2 (med) T61

Comments

@tombrunet
Copy link
Member

Project

accessibility-checker-engine

Browser

Chrome

Operating system

MacOS

Description

Issue triggering regarding label in name, but non-visible label is being used in the calculation

Steps to reproduce

Testcase:

<button aria-label="Visible label">
  <span style="position:absolute;left:-1000px">Offscreen content</span>
  Visible label
</button>

2.5.3 requires that the visible text is in the accessible name. The rule is also looking for the offscreen text (which isn't visible) to be included in the accessible name. While this particular scenario is odd in that there is screen reader specific text which is then overridden via aria-label to not expose the screen reader specific text, it's technically not a 2.5.3 violation.

@shunguoy shunguoy added the T61 label Apr 8, 2024
@philljenkins
Copy link
Contributor

One way to resolve this might be to separate the failure reasons when the item is off screen.

@marcjohlic marcjohlic added the engine Issues in the accessibility-checker-engine component label Apr 22, 2024
@shunguoy
Copy link
Contributor

The rule input_label_visible calculates the off-screen label as part of the label.

@shunguoy shunguoy added priority-2 (med) false-positive Rules incorrectly reporting a violation labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issues in the accessibility-checker-engine component false-positive Rules incorrectly reporting a violation priority-2 (med) T61
Projects
None yet
Development

No branches or pull requests

4 participants