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

SelectButton: the aria-labelledby attribute value is invalid for the div.p-button(s) #14979

Closed
barbGit2 opened this issue Mar 7, 2024 · 4 comments
Assignees
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA Type: Bug Issue contains a bug related to a specific component. Something about the component is not working

Comments

@barbGit2
Copy link

barbGit2 commented Mar 7, 2024

Describe the bug

The div.p-button's aria-labelledby attribute values in the p-selectButton are invalid. The value is the same as the aria-label, but it should be pointing to the id attribute of the label element. See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby

Environment

Linux Chrome browser

Reproducer

No response

Angular version

16

PrimeNG version

16.9.1 and master

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.20.2

Browser(s)

Chrome 122.0.6261.94

Steps to reproduce the behavior

  1. In the browser, G=go to PrimeNG's SelectButton page (https://primeng.org/selectbutton)
  2. Use the browser's Developer tool's Elements tab's 'Select an element' button to select one of the button elements inside the p-selectButton. The aria-labelledby attribute is the value of the option and NOT the id of the label element

Expected behavior

The aria-labelledby attribute should point to the id of the label element

@barbGit2 barbGit2 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 7, 2024
@cetincakiroglu cetincakiroglu added this to the 17.11.0 milestone Mar 8, 2024
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Component: Accessibility Issue or pull request is related to WCAG or ARIA and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 13, 2024
@cetincakiroglu cetincakiroglu self-assigned this Mar 13, 2024
@cetincakiroglu
Copy link
Contributor

Hi,

I tested the component with AxeDevtools and couldn't get the error you mentioned above. Which test tool you've used to catch the error?

@cetincakiroglu cetincakiroglu modified the milestones: 17.11.0, 17.12.0 Mar 13, 2024
@barbGit2
Copy link
Author

I am running jasmine tests using Axe, but my tests are not picking up that error either. I do not think that means that this issue should be ignored. If you look at the docs (Mozilla aria-labelledby and https://w3c.github.io/aria/#aria-labelledby), it does say the 'aria-labelledyby' attribute "identifies the element (or elements) that labels the current element" and that the value should be an 'ID reference list'.

@cetincakiroglu
Copy link
Contributor

Hi,

Overriding any property will be available by PassThrough implementation. You'll be able to override and assign properties. This feature is currently under development in https://github.com/primefaces/primeng/tree/passthrough we're planning to release within v17 for all components. Moving the issue to the 17.next milestone, we'll close this issue once the PassThrough for selectButton is done.

@cetincakiroglu cetincakiroglu modified the milestones: 17.12.0, 17.Future Mar 19, 2024
@mehmetcetin01140
Copy link
Contributor

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

@github-project-automation github-project-automation bot moved this to Done in PrimeNG Dec 16, 2024
@mehmetcetin01140 mehmetcetin01140 removed this from the 19.x milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants