-
Notifications
You must be signed in to change notification settings - Fork 132
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
base: main
Are you sure you want to change the base?
Conversation
changelog: Bug fixes, accessibility, slow down countdown frequency
23a9f9a
to
e704197
Compare
|
||
def initialize( | ||
screen_reader_frequency: nil, |
There was a problem hiding this comment.
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:
identity-idp/app/views/session_timeout/_warning.html.erb
Lines 10 to 38 in 2b6458b
<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> |
There was a problem hiding this comment.
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.
🎫 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.