diff --git a/src/App.vue b/src/App.vue index 652ad8b..6f3e9b8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -12,6 +12,12 @@ onMounted(() => { diff --git a/src/assets/layout/layout.scss b/src/assets/layout/layout.scss index 5b07d53..ab04dad 100644 --- a/src/assets/layout/layout.scss +++ b/src/assets/layout/layout.scss @@ -1,11 +1,10 @@ -/* Estilos globais de layout — sem @apply (regra do projeto) */ - html, body { height: 100%; margin: 0; padding: 0; font-family: 'DM Sans', system-ui, sans-serif; + font-size: 16px; /* base mínimo para leitura confortável */ } #app { @@ -14,7 +13,7 @@ body { flex-direction: column; } -/* Transições de rota */ +/* ── Transições de rota ────────────────────────────────────────────── */ .page-enter-active, .page-leave-active { transition: opacity 0.18s ease; @@ -23,3 +22,85 @@ body { .page-leave-to { opacity: 0; } + +/* ── Acessibilidade global ─────────────────────────────────────────── */ + +/* + * Focus ring visível e de alto contraste. + * Usa currentColor para se adaptar a qualquer tema de cor. + * Nunca remover — usuários de teclado e leitores de tela dependem disso. + */ +:focus-visible { + outline: 3px solid currentColor; + outline-offset: 3px; + border-radius: 4px; +} + +/* + * Skip link — oculto até receber foco via Tab. + * Permite que usuários de teclado pulem a navegação e vão direto ao conteúdo. + */ +.skip-link { + position: fixed; + top: -100%; + left: 1rem; + z-index: 9999; + padding: 0.875rem 1.5rem; + background: #1e293b; + color: #fff; + font-weight: 600; + font-size: 1rem; + border-radius: 0.5rem; + text-decoration: none; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); + transition: top 0.15s ease; + + &:focus { + top: 1rem; + } +} + +/* + * Respeitar a preferência de usuário por menos movimento (vestibular, + * epilepsia, sensibilidade visual). Afeta autoplay do carousel e transições. + */ +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } + + /* Garante que transições de rota também param */ + .page-enter-active, + .page-leave-active { + transition: none; + } +} + +/* ── Alvo de toque mínimo (WCAG 2.5.5) ────────────────────────────── */ +/* + * Botões e links pequenos precisam de área clicável mínima de 44×44px + * para usuários com dificuldade motora ou em telas touch. + */ +button, +[role='button'], +a { + min-height: 44px; + display: inline-flex; + align-items: center; +} + +/* + * Exceção para elementos inline de parágrafo onde forçar altura quebra + * o layout (links dentro de texto corrido). + */ +p a, +li a, +.inline-link { + min-height: unset; + display: inline; +} diff --git a/src/components/auth/DocumentoInput.vue b/src/components/auth/DocumentoInput.vue index f6eb9f0..be62958 100644 --- a/src/components/auth/DocumentoInput.vue +++ b/src/components/auth/DocumentoInput.vue @@ -44,8 +44,11 @@ function onInput(e) { :value="valorFormatado" :placeholder="placeholder" inputmode="numeric" + autocomplete="username" class="w-full text-lg tracking-wide" size="large" + aria-label="CPF ou CNPJ" + aria-required="true" @input="onInput" />