Description of Issue
The aria-description for media-time-display is incorrect when the audio player first loads and the elapsed time is zero, it read " of 48 minutes, 10 seconds" instead of the more helpful "0 seconds of 48 minutes, 10 seconds":
Bug
The bug is on (line 49 of time.ts)[https://github.com/muxinc/media-chrome/blob/main/src/js/utils/time.ts#L49]
timeUnitValue && is a falsy check so if the value is 0 the condition isn't met and timeString is left as ""
Suggested Fix
Change the return statement on line 61 of time.ts to return timeString || toTimeUnitPhrase(0, 2);
Description of Issue
The
aria-descriptionfor media-time-display is incorrect when the audio player first loads and the elapsed time is zero, it read " of 48 minutes, 10 seconds" instead of the more helpful "0 seconds of 48 minutes, 10 seconds":Bug
The bug is on (line 49 of time.ts)[https://github.com/muxinc/media-chrome/blob/main/src/js/utils/time.ts#L49]
timeUnitValue &&is a falsy check so if the value is 0 the condition isn't met andtimeStringis left as""Suggested Fix
Change the return statement on line 61 of time.ts to
return timeString || toTimeUnitPhrase(0, 2);