Run yarn test to see aria-controls="collapsible-content-1676553478193" changing values on each run
Expected behavior
Either make ids of collapsible elements required or generate unique values in a deterministic way independent from dates.
An coming to mind would be to use a canonical value (or a hash, or a slug) of the trigger prop value by default rather than a date.
Additional context
The issue is not major, although the usage of dates for making HTML attribute values unique is not conventional for use cases that are not time sensitive.
Describe the bug The usage of dates (
Date()
) makes snapshot testing more difficult.To Reproduce Steps to reproduce the behavior:
yarn test
to seearia-controls="collapsible-content-1676553478193"
changing values on each runExpected behavior Either make
id
s of collapsible elements required or generate unique values in a deterministic way independent from dates. An coming to mind would be to use a canonical value (or a hash, or a slug) of thetrigger
prop value by default rather than a date.Screenshots Example errors given by test runner:
Additional context The issue is not major, although the usage of dates for making HTML attribute values unique is not conventional for use cases that are not time sensitive.