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

InputMask: Missing id property #6100

Closed
SamuelWei opened this issue Jul 23, 2024 · 0 comments
Closed

InputMask: Missing id property #6100

SamuelWei opened this issue Jul 23, 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

@SamuelWei
Copy link

Describe the bug

The id property is not passed through to the native rendered input of type text.
The same behaivor with the name attribute would also be desirable.

The problem can be reproduced or seen directly in the official documentation:
V4 Documentation (https://primevue.org/inputmask/):

<div class="flex-auto">
    <label for="phone" class="font-bold block mb-2">Phone</label>
    <InputMask id="phone" v-model="value2" mask="(999) 999-9999" placeholder="(999) 999-9999" fluid />
</div>

The rendered native input element is missing the id="phone" prop:

image

V3 Documentation (https://v3.primevue.org/inputmask/):

<div class="flex-auto">
    <label for="phone" class="font-bold block mb-2">Phone</label>
    <InputMask id="phone" v-model="value2" mask="(999) 999-9999" placeholder="(999) 999-9999" />
</div>

The rendered native input element has the id="phone" prop:

image

This problem not only exists on the official documentation website but also when I use the component directly in my own application.


Successor of #6025

Reproducer

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

PrimeVue version

4.1.0

Vue version

4.x

Language

ALL

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. use InputMask component
  2. define id property in the input mask

image

  1. check the rendered html output and check if they are missing.

image

Expected behavior

The same behaviour like on V3 and as described in the following part of the documentation. The id should be passed to the input element (https://primevue.org/inputmask/#accessibility):

@SamuelWei SamuelWei added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 23, 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 Aug 1, 2024
@tugcekucukoglu tugcekucukoglu added this to the 4.0.4 milestone Aug 1, 2024
@tugcekucukoglu tugcekucukoglu self-assigned this Aug 1, 2024
tugcekucukoglu added a commit that referenced this issue Aug 1, 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

Successfully merging a pull request may close this issue.

2 participants