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

Step: Cannot disable custom step element #6763

Closed
TechSupportJosh opened this issue Nov 11, 2024 · 0 comments
Closed

Step: Cannot disable custom step element #6763

TechSupportJosh opened this issue Nov 11, 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

@TechSupportJosh
Copy link

Describe the bug

When using a custom slot element for Step, the disabled attribute is not exposed / passed to the element. When this is combined with a linear Stepper, the step is still clickable even when it should be disabled.

Reproducer

https://stackblitz.com/edit/primevue-4-ts-vite-issue-template-epse6t?file=src%2FApp.vue

PrimeVue version

4.1.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vue CLI App

Browser(s)

No response

Steps to reproduce the behavior

  1. Create a custom "asChild" value for the Step element.
  2. Bind the a11y attributes as mentioned within the documentation.
  3. Note that step header does not get disabled.

In the Stackblitz link, linear is enabled on the stepper, however the third content step is not disabled

Expected behavior

The binded a11y attributes would include the p-disabled attribute set to true, disabling the element.

From what I can tell, the component exposes the active value to the component:
https://github.com/primefaces/primevue/blob/5c6d80f4396d3b09fff3a82ae931b0d571d0a7ff/packages/primevue/src/step/Step.vue#L11C1-L11C127

However, it does not pass the disabled / isStepDisabled attribute down. Not sure whether the a11y attributes are incorrect because it's relying upon this.disabled, instead of isStepDisabled.

@TechSupportJosh TechSupportJosh added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 11, 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 Nov 15, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.2.3 milestone Nov 15, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Nov 15, 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