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: aria-disabled contains code instead of a boolean value #5235

Closed
midyro opened this issue Feb 7, 2024 · 0 comments
Closed

SelectButton: aria-disabled contains code instead of a boolean value #5235

midyro opened this issue Feb 7, 2024 · 0 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@midyro
Copy link

midyro commented Feb 7, 2024

Describe the bug

While using the SelectButton component with the option-disabled, I saw in that the aria-disabled attribute wasn't a boolean but the code to disable the option.

If you open inspect, the HTML looks like this:

<div class="p-selectbutton p-buttonset p-component" role="group" data-pc-name="selectbutton" data-pc-section="root" name="demo"><div tabindex="0" aria-label="Test value 1" role="radio" aria-checked="true" aria-disabled="(option) => {
  if (option.value === 2) {
    return true;
  }

  return false;
}" ...

Reproducer

https://stackblitz.com/edit/primevue-create-vue-issue-template-4k4vwi

PrimeVue version

3.4.8

Vue version

3.x

Language

ALL

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Create a component that uses a SelectButton
  2. Add a few options
  3. Add the prop option-disabled with either a function or a string as the value
  4. Use the browsers inspect function and check the code of the SelectButton

Expected behavior

The aria-disabled attribute should be a boolean.

@midyro midyro added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 7, 2024
@tugcekucukoglu tugcekucukoglu added this to the 3.49.0 milestone Feb 8, 2024
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Feb 8, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants