Skip to content

Conversation

@joshlarson
Copy link
Contributor

Scope

Asana Ticket: [SF/UD] 👂🐞 Crossed out "scheduled at" CR times are read out as regular times

Implementation

  • Replaced the {:scheduled_at, time} arrival substatus with {:delayed_from, time} and {:early_from, time}, since even though the visual display is the same for both, the readout is different.
  • Applied aria-labels to the substatus components of "Delayed from time" and "Early; Originally scheduled at time".

Screenshots

Delayed

Screenshot 2026-01-16 at 4 12 21 PM Screenshot 2026-01-16 at 4 12 24 PM

Early

Screenshot 2026-01-16 at 4 11 54 PM Screenshot 2026-01-16 at 4 11 50 PM

How to test

Find a trip* that's running early or late. Right-click on the HH:MM hh:mm display and inspect accessibility attributes (in Firefox at least - I'm not sure how to do this in Chrome or Safari). OR navigate through the page with a screen reader.

*Finding a trip can be a bit annoying. I usually go either linearly or randomly through the list of CR routes, and for each route/direction combo, I look at the second-to-last stop. If there are any trips with realtime info, then I look to see where they are now, go to that stop, and then look at each stop progressing as the train would until I find a stop that matches what I'm looking for (I start where the train currently is because predictions seem to be more likely to be "on time" when they're further away from where the train actually is).

@joshlarson joshlarson requested a review from a team as a code owner January 16, 2026 21:22
@joshlarson joshlarson requested a review from thecristen January 16, 2026 21:22
@joshlarson joshlarson enabled auto-merge (squash) January 16, 2026 21:23
Copy link
Collaborator

@thecristen thecristen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally on board with the backend change, just want to reuse our time formatting function.

~H"""
<span class="text-xs line-through" aria-label={"Early; Originally scheduled at #{@time}"}>
{@time}
</span>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: instead of repeating this time formatting over and over, let's re-use <.formatted_time /> (perhaps needs modifying so it can support aria-label)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do support this for consistent time displaying, but the aria label still needs the formatted time (otherwise it reads out the whole datetime, rather than a nice audibly formatted time).

Image

@joshlarson joshlarson force-pushed the jdl/sf2.0/ud/readout-for-early-and-delayed-cr-substatus branch from 413020f to fe3334e Compare January 17, 2026 02:32
@joshlarson joshlarson requested a review from thecristen January 17, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants