The API of this component can be considered fairly stable, but there
are still uncertainties about accessibility aspects, such as the
handling of the <time> element and its datetime attribute by screen
readers and the limited accessibility of the title attribute.
Usage
By default, the given value is formatted for display with to_string/1. This:
<.timevalue={~T[12:22:06.003Z]}/>
Will be rendered as:
You can also pass a custom formatter function. For example, if you are using
ex_cldr_dates_times in your
application, you could do this:
If you pass a title_formatter, a title attribute is added to the
element. This can be useful if you want to render the value in a shortened
or relative format, but still give the user access to the complete value.
Note that the title attribute is only accessible to users who use
a pointer device. Some screen readers may however announce the datetime
attribute that is always added.