pretix icon indicating copy to clipboard operation
pretix copied to clipboard

[A11y] add <time> to timezone JavaScript

Open wiffbi opened this issue 4 years ago • 3 comments

Describe the bug Currently when the user is in a different timezone than the event, JavaScript adds text to note the time in the users timezone, without corretly marking it as a <time> element.

Expected behavior Time should be marked up correctly. Ideally add a .sr-only text as an alternative for the icon or use role="img" with an aria-label on the icons <span> element.

wiffbi avatar Oct 27 '21 08:10 wiffbi

Or maybe the other way around, maybe the original HTML should use <time> instead of our custom data-datetime attribute and the JS snippet should look for that? Or are there special cases in which this would be annoying?

raphaelm avatar Oct 31 '21 17:10 raphaelm

You mean encoding the timezone-info in the datetime-attribute of <time> and let Javascript pick up the values from there? Should be possible – although that means AFAIK to include a full date with time and timezone. I will test how screen-readers will read this as always repeating the date when all dates are on the same day might become tedious pretty quickly.

wiffbi avatar Nov 01 '21 06:11 wiffbi

At least Safari with VoiceOver on macOS only reads the textContent of

wiffbi avatar Nov 02 '21 08:11 wiffbi