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

[PS-1198] Desktop / Browser: Accessibility - make TOTP countdown announce for assistive technology users #2660

Merged
merged 19 commits into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c71f441
Make totp countdown `aria-hidden`, add copy of countdown as `sr-only`…
patrickhlauke May 8, 2022
05213cb
Make exact same changes to desktop totp
patrickhlauke May 8, 2022
5a91097
Tweak copy button accessible name approach
patrickhlauke May 8, 2022
2f8c09c
Add `aria-atomic="true"`
patrickhlauke May 8, 2022
ebd35ff
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Jun 21, 2022
10b6804
Update, run prettier, lint
patrickhlauke Jun 21, 2022
6af2a1e
Remove orphaned jslibs
patrickhlauke Jun 21, 2022
e6e840a
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Jun 21, 2022
e520042
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Jul 21, 2022
2924ad4
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Jul 27, 2022
c2fed81
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Aug 6, 2022
544fbef
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Aug 13, 2022
6be3657
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Aug 18, 2022
2fbdb8a
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Aug 29, 2022
ab46ba6
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Aug 30, 2022
084d60d
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Sep 4, 2022
c135f87
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Sep 13, 2022
6ca1781
Merge branch 'master' into patrickhlauke-issue2657
djsmith85 Sep 25, 2022
7ac6531
Merge branch 'master' into patrickhlauke-issue2657
patrickhlauke Sep 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/browser/src/popup/scss/misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ p.lead {
border: 0 !important;
}

:not(:focus) > .exists-only-on-parent-focus {
display: none;
}

.password-wrapper {
overflow-wrap: break-word;
white-space: pre-wrap;
Expand Down
11 changes: 9 additions & 2 deletions apps/browser/src/popup/vault/view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h2 class="box-header">
>
<span class="totp-code">{{ totpCodeFormatted }}</span>
</div>
<span class="totp-countdown">
<span class="totp-countdown" aria-hidden="true">
<span class="totp-sec">{{ totpSec }}</span>
<svg>
<g>
Expand All @@ -176,10 +176,17 @@ <h2 class="box-header">
type="button"
class="row-btn"
appStopClick
appA11yTitle="{{ 'copyVerificationCode' | i18n }}"
title="{{ 'copyVerificationCode' | i18n }}"
(click)="copy(totpCode, 'verificationCodeTotp', 'TOTP')"
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
<span class="sr-only">{{ "copyValue" | i18n }}</span>
<span
class="sr-only exists-only-on-parent-focus"
aria-live="polite"
aria-atomic="true"
>{{ totpSec }}</span
>
</button>
</div>
</div>
Expand Down
11 changes: 9 additions & 2 deletions apps/desktop/src/app/vault/view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h2 class="box-header">
>
<span class="totp-code">{{ totpCodeFormatted }}</span>
</div>
<span class="totp-countdown">
<span class="totp-countdown" aria-hidden="true">
<span class="totp-sec">{{ totpSec }}</span>
<svg>
<g>
Expand All @@ -136,10 +136,17 @@ <h2 class="box-header">
type="button"
class="row-btn"
appStopClick
appA11yTitle="{{ 'copyValue' | i18n }}"
title="{{ 'copyValue' | i18n }}"
(click)="copy(totpCode, 'verificationCodeTotp', 'TOTP')"
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
<span class="sr-only">{{ "copyValue" | i18n }}</span>
<span
class="sr-only exists-only-on-parent-focus"
aria-live="polite"
aria-atomic="true"
>{{ totpSec }}</span
>
</button>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions apps/desktop/src/scss/misc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ p.lead {
border: 0 !important;
}

:not(:focus) > .exists-only-on-parent-focus {
display: none;
}

.totp {
.totp-code {
font-family: $font-family-monospace;
Expand Down