mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
feat(a11y): cross-platform hardening + modal focus-trap from impeccable audit
Responsive / viewport: - add .min-h-viewport / .h-viewport utilities (100dvh + Telegram --tg-viewport-stable-height) - migrate min-h-screen / h-screen / 100vh across 18 files - reveal hover-only controls on focus-within + touch (desktop nav, admin settings) - grid breakpoints (TopUpAmount, Contests), larger touch targets, nav aria-labels Platform routing (Telegram WebView correctness): - clipboard -> copyToClipboard util with execCommand fallback (10 files) - window.open -> openTelegramLink / openLink (Profile, Referral, ChannelSubscriptionScreen) - window.confirm -> useNativeDialog (admin pages); PromoOffersSection -> useDestructiveConfirm - window.prompt -> usePrompt / PromptDialogHost (TipTap link editors) - ESLint no-restricted-properties guard against regressions (adapters/clipboard util exempt) Modal accessibility: - new useFocusTrap hook (focus trap, Esc, scroll lock, focus restore) - role=dialog / aria-modal / focus-trap: Polls, SuccessNotificationModal, AdminPolicies, AdminPromoGroups, AdminCampaigns, BroadcastPreview (Telegram + Email) - new global usePrompt store + PromptDialogHost
This commit is contained in:
@@ -1111,6 +1111,18 @@ img.twemoji {
|
||||
}
|
||||
|
||||
@layer utilities {
|
||||
/* Viewport height — correct across web (dvh) and Telegram Mini App.
|
||||
main.tsx binds --tg-viewport-stable-height via bindViewportCssVars();
|
||||
on the standalone web build the var is undefined and falls back to 100dvh. */
|
||||
.min-h-viewport {
|
||||
min-height: 100dvh;
|
||||
min-height: var(--tg-viewport-stable-height, 100dvh);
|
||||
}
|
||||
.h-viewport {
|
||||
height: 100dvh;
|
||||
height: var(--tg-viewport-stable-height, 100dvh);
|
||||
}
|
||||
|
||||
/* Text gradient */
|
||||
.text-gradient {
|
||||
@apply bg-gradient-to-r from-accent-400 to-accent-600 bg-clip-text text-transparent;
|
||||
|
||||
Reference in New Issue
Block a user