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

Mis-identification of landmark role, false positive for unique AccName #4722

Open
1 task done
MelSumner opened this issue Mar 7, 2025 · 2 comments
Open
1 task done
Labels
fix Bug fixes rules Issue or false result from an axe-core rule

Comments

@MelSumner
Copy link

MelSumner commented Mar 7, 2025

Product

axe-core

Product Version

4.10.2

Latest Version

  • I have tested the issue with the latest version of the product

Issue Description

Expectation

I expect landmark roles to be identified correctly.
I expect values for aria-labelledby to be correctly differentiated.

Actual

Screenshot:
Image

I have a section element with the role of tabpanel. There are several tabpanels, and they are all given a unique accessible name through the aria-labelledby attribute. Visible in the screenshot are those values.

  1. My first issue is that an element with the role of tabpanel is not a landmark element.
  2. My second issue is that I did not expect to receive an error about unique AccNames, when the values for each aria-labelledby attribute are unique ID values. However, if the tool is actually replacing the ID with the text value for that ID, then this would not be a false positive (since this is on a page with several demo versions of a component).

How to Reproduce

Hopefully the attached screenshot is enough information to reproduce the issue. If not, please let me know.

@MelSumner MelSumner added the ungroomed Ticket needs a maintainer to prioritize and label label Mar 7, 2025
@straker
Copy link
Contributor

straker commented Mar 7, 2025

Thanks for the issue.

  1. Yes, this appears to be a bug in our code (specifically in our matcher where we say if a section element has an accessible name it's a landmark and ignore the actual role of the element). The section should not be counted as a landmark in this case.
  2. This is expected behavior as the landmark rule looks at the accessible name of the landmarks to make sure the accessible names are unique.

@straker straker added fix Bug fixes rules Issue or false result from an axe-core rule and removed ungroomed Ticket needs a maintainer to prioritize and label labels Mar 7, 2025
@MelSumner
Copy link
Author

Ok, thank you for confirming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes rules Issue or false result from an axe-core rule
Projects
None yet
Development

No branches or pull requests

2 participants