-
Notifications
You must be signed in to change notification settings - Fork 297
fix: accessibility improvements login(https://wearezeta.atlassian.net/browse/WPB-20819) #19714
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d57105d
fix: make password toggle button accessible and localised(WPB-21228)
arjita-mitra 9824fd1
fix: translate type
arjita-mitra b49057b
fix: Login - New view is not announced
arjita-mitra 2977e5b
fix: make back button accessible WPB-21466
arjita-mitra 0f935c0
fix: make external link 2fa accessible(WPB-21279)
arjita-mitra 96e39ee
fix: password toggle button text alternative(WPB-21228)
arjita-mitra 18abd34
fix: make verify account header focusable using screenkey and login s…
arjita-mitra 7730cd4
Merge branch 'dev' into improv/accessibility-login-WPB-20819
arjita-mitra 7be324b
fix: add toggle password show/hide label
arjita-mitra d83fda4
fix: address review comments
arjita-mitra f4912c7
Merge branch 'dev' into improv/accessibility-login-WPB-20819
arjita-mitra f7b571c
chore: bump core packages
arjita-mitra a4abdf5
Merge branch 'improv/accessibility-login-WPB-20819' of github.com:wir…
arjita-mitra c5e07e4
fix: pipeline issues
arjita-mitra 20e2426
fix: PR comments
arjita-mitra 67b71e7
Merge branch 'dev' of github.com:wireapp/wire-webapp into improv/acce…
arjita-mitra eb08175
Merge branch 'dev' into improv/accessibility-login-WPB-20819
arjita-mitra f00c93d
fix: pipeline issues
arjita-mitra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /* | ||
| * Wire | ||
| * Copyright (C) 2025 Wire Swiss GmbH | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. If not, see http://www.gnu.org/licenses/. | ||
| * | ||
| */ | ||
|
|
||
| import {useRouteA11y} from '../hooks/useRouteA11y'; | ||
|
|
||
| export const RouteA11y: React.FC = (): null => { | ||
| useRouteA11y(); | ||
| return null; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| /* | ||
| * Wire | ||
| * Copyright (C) 2025 Wire Swiss GmbH | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. If not, see http://www.gnu.org/licenses/. | ||
| * | ||
| */ | ||
|
|
||
| import {useEffect} from 'react'; | ||
|
|
||
| import {useLocation} from 'react-router-dom'; | ||
|
|
||
| export function useRouteA11y(screenKey?: string) { | ||
| const location = useLocation(); | ||
|
|
||
| useEffect(() => { | ||
| const focusTarget: HTMLElement | null = | ||
| document.querySelector<HTMLElement>('[data-page-title]') || | ||
| document.querySelector<HTMLElement>('main,[role="main"]') || | ||
| document.querySelector<HTMLElement>('h1'); | ||
|
|
||
| if (!focusTarget) { | ||
| return; | ||
| } | ||
|
|
||
| // scroll to top on each route change | ||
| window.scrollTo({top: 0, left: 0}); | ||
|
|
||
| const element = focusTarget; | ||
| element.setAttribute('tabindex', '-1'); | ||
| element.classList.add('sr-only-focus'); | ||
| element.focus({preventScroll: true}); | ||
|
|
||
| // remove tabindex after blur | ||
| const handleBlur = () => { | ||
| element.classList.remove('sr-only-focus'); | ||
| element.removeAttribute('tabindex'); | ||
| element.removeEventListener('blur', handleBlur); | ||
| }; | ||
| element.addEventListener('blur', handleBlur); | ||
| }, [location.key, screenKey]); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.