kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.34k stars 5.88k forks source link

Prevent invalid empty id attributes. #4091

Open digitaldonkey opened 3 years ago

marcoliverteschke commented 3 years ago

For context: this pops up when you send your actual DOM after JS has been evaluated through a validator instead of just the initial source returned from the server. This might happen, for instance, when your site gets audited for accessibility.

Having empty IDs in the ”offstage” slides invalidates the markup, because if an ID attribute is present, its value must not be empty.

Ashwary-Jharbade commented 1 year ago

Hi @kenwheeler , Could you please review this PR? Setting id to empty will cause cloned elements to lose CSS properties as well if applied via id. Please share your thoughts if you think changes will have any negative impact.