infor-design / enterprise-wc

Enterprise-grade web component library for the Infor Design System
Apache License 2.0
27 stars 26 forks source link

IdsTimePicker/IdsDatePicker: `ids-time-picker` / `ids-date-picker` id are the same as the internal `ids-trigger-field` id #2710

Open n-ace-ancog opened 1 month ago

n-ace-ancog commented 1 month ago

Describe the bug Internal ids-trigger-field of a time picker and date picker has the same id of its parent.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://main.wc.design.infor.com/ids-date-picker/example.html
  2. Inspect element in the page
  3. Go to https://main.wc.design.infor.com/ids-time-picker/example.html
  4. Inspect element in the page
  5. Enter (() => { const tp = document.createElement('ids-time-picker'); tp.id = 'test-id'; document.querySelector('ids-container').appendChild(tp); })() in the console and inspect element
  6. Enter (() => { const tp = document.createElement('ids-time-picker'); document.querySelector('ids-container').appendChild(tp); })() in the console and look at ids-trigger-button and ids-time-picker-popup ids have incomplete id strings

Expected behavior IDs should be unique

Version

Screenshots image

image

tmcconechy commented 1 month ago

Technically if its in the shadowRoot its a different document so dont need unique IDs but maybe we can do ${mainElement.id}-internal-input or something