From 8627f450547e4e601560827c83dde4cef575db35 Mon Sep 17 00:00:00 2001 From: Cristen Jones Date: Thu, 9 Jan 2025 11:26:01 -0500 Subject: [PATCH] feat(TripPlanner.ResultsSummary): make it a live region --- lib/dotcom_web/components/trip_planner/results_summary.ex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/dotcom_web/components/trip_planner/results_summary.ex b/lib/dotcom_web/components/trip_planner/results_summary.ex index c0bb63a7ae..79196f7d9a 100644 --- a/lib/dotcom_web/components/trip_planner/results_summary.ex +++ b/lib/dotcom_web/components/trip_planner/results_summary.ex @@ -7,6 +7,9 @@ defmodule DotcomWeb.Components.TripPlanner.ResultsSummary do attr :class, :string, default: "" attr :results, :any, required: true + # ARIA attributes are used so that AT announces the entire text, even if only + # part of it changes. role=status provides AT with additional support + # (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions#roles_with_implicit_live_region_attributes) def results_summary(assigns) do ~H"""

{submission_summary(@changeset.changes)}

{time_summary(@changeset.changes)}