Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LG-15064: Countdown alerts for expiring phone OTP announces too frequently #11899

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jmdembe
Copy link
Contributor

@jmdembe jmdembe commented Feb 19, 2025

🎫 Ticket

Link to the relevant ticket:
LG-15064

🛠 Summary of changes

This ticket addresses a bug where the alert component announces the timer countdown every second.

@jmdembe jmdembe force-pushed the jd/LG-15064-countdown-timer branch from 23a9f9a to e704197 Compare February 19, 2025 16:11

def initialize(
screen_reader_frequency: nil,
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than adding a new option here, did you consider using the approach that we use in the session timeout modal? Namely, having two separate countdowns, one of which is used for assistive technology announces at a slower interval:

<p>
<%= t(
# i18n-tasks-use t('notices.timeout_warning.signed_in.message_html')
# i18n-tasks-use t('notices.timeout_warning.partially_signed_in.message_html')
'message_html',
scope: modal_presenter.translation_scope,
time_left_in_session_html: render(
CountdownComponent.new(
expiration: Time.zone.now,
start_immediately: false,
),
),
) %>
</p>
<p class="usa-sr-only" id="<%= c.description_id %>" role="timer" aria-live="polite" aria-atomic="true">
<%= t(
# i18n-tasks-use t('notices.timeout_warning.signed_in.live_region_message_html')
# i18n-tasks-use t('notices.timeout_warning.partially_signed_in.live_region_message_html')
'live_region_message_html',
scope: modal_presenter.translation_scope,
time_left_in_session_html: render(
CountdownComponent.new(
expiration: Time.zone.now,
update_interval: 30.seconds,
start_immediately: false,
),
),
) %>
</p>

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 thought that I was going in this direction, but I am pivoting because I originally thought it was to use the one element.

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.

2 participants