Skip to content

fix: registration pages not compliant with a11y contrast ratio #35885

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/long-tools-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@rocket.chat/web-ui-registration': patch
'@rocket.chat/meteor': patch
---

Fixes registration pages a11y color contrast and apply browser theme configuration
4 changes: 4 additions & 0 deletions apps/meteor/client/views/root/MainLayout/LoginPage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { PaletteStyleTag } from '@rocket.chat/fuselage';
import { useDarkMode } from '@rocket.chat/fuselage-hooks';
import { useSession } from '@rocket.chat/ui-contexts';
import type { LoginRoutes } from '@rocket.chat/web-ui-registration';
import RegistrationRoute from '@rocket.chat/web-ui-registration';
Expand All @@ -11,13 +13,15 @@ const LoginPage = ({ defaultRoute, children }: { defaultRoute?: LoginRoutes; chi
const { t } = useTranslation();
const showForcedLogoutBanner = useSession('force_logout') as boolean | undefined;
const iframeLoginUrl = useIframeLogin();
const isDarkMode = useDarkMode();

if (iframeLoginUrl) {
return <iframe title={t('Login')} src={iframeLoginUrl} style={{ height: '100%', width: '100%' }} />;
}

return (
<>
<PaletteStyleTag theme={isDarkMode ? 'dark' : 'light'} tagId='registration-palette' />
{showForcedLogoutBanner && <LoggedOutBanner />}
<RegistrationRoute defaultRoute={defaultRoute} children={children} />
</>
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
"@rocket.chat/icons": "^0.42.0",
"@rocket.chat/instance-status": "workspace:^",
"@rocket.chat/jwt": "workspace:^",
"@rocket.chat/layout": "~0.32.0",
"@rocket.chat/layout": "^0.32.1",
"@rocket.chat/license": "workspace:^",
"@rocket.chat/log-format": "workspace:^",
"@rocket.chat/logger": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/web-ui-registration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@babel/preset-react": "~7.25.9",
"@babel/preset-typescript": "~7.26.0",
"@rocket.chat/i18n": "workspace:~",
"@rocket.chat/layout": "~0.32.0",
"@rocket.chat/layout": "^0.32.1",
"@rocket.chat/mock-providers": "workspace:~",
"@rocket.chat/tools": "workspace:~",
"@rocket.chat/ui-client": "workspace:^",
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8397,15 +8397,15 @@ __metadata:
languageName: unknown
linkType: soft

"@rocket.chat/layout@npm:~0.32.0":
version: 0.32.0
resolution: "@rocket.chat/layout@npm:0.32.0"
"@rocket.chat/layout@npm:^0.32.1":
version: 0.32.1
resolution: "@rocket.chat/layout@npm:0.32.1"
peerDependencies:
"@rocket.chat/fuselage": "*"
react: "*"
react-dom: "*"
react-i18next: "*"
checksum: 10/73b2aece24f974bc6ed339c5f3910824f7aa18d85be6f16ce48dcda2360b938c67a316100682850994bb4e046a20ace655e1d9615946e04bcbe1708fdb3038a9
checksum: 10/fccf3c862a053945eaabf56e87658f4b5f0f4a99141365195e175af47d49af68d9569e6dbe63e12b73eb0f8dcd2e7d641852374f5bcf458a43ca69bf56960bc2
languageName: node
linkType: hard

Expand Down Expand Up @@ -8656,7 +8656,7 @@ __metadata:
"@rocket.chat/instance-status": "workspace:^"
"@rocket.chat/jest-presets": "workspace:~"
"@rocket.chat/jwt": "workspace:^"
"@rocket.chat/layout": "npm:~0.32.0"
"@rocket.chat/layout": "npm:^0.32.1"
"@rocket.chat/license": "workspace:^"
"@rocket.chat/livechat": "workspace:^"
"@rocket.chat/log-format": "workspace:^"
Expand Down Expand Up @@ -9929,7 +9929,7 @@ __metadata:
"@babel/preset-react": "npm:~7.25.9"
"@babel/preset-typescript": "npm:~7.26.0"
"@rocket.chat/i18n": "workspace:~"
"@rocket.chat/layout": "npm:~0.32.0"
"@rocket.chat/layout": "npm:^0.32.1"
"@rocket.chat/mock-providers": "workspace:~"
"@rocket.chat/tools": "workspace:~"
"@rocket.chat/ui-client": "workspace:^"
Expand Down
Loading