npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

acessibilidade-react

v0.1.2

Published

Biblioteca de componentes React acessíveis seguindo as diretrizes WCAG 2.1

Readme

Biblioteca de Componentes React Acessiveis

Biblioteca de componentes React acessiveis desenvolvida como projeto de TCC-2 do curso de Engenharia de Software da UTFPR - Campus Dois Vizinhos. Os componentes seguem as diretrizes WCAG 2.1 (nivel AA) do W3C.

Componentes

| Componente | Descricao | |------------|-----------| | Button | 5 variantes (primary, secondary, outline, ghost, danger), 3 tamanhos, estados loading/disabled, suporte a icones | | Input | Campo de entrada com label associada, mensagens de erro com role="alert", aria-invalid, aria-describedby | | Select | Select nativo com label, placeholder, opcoes desabilitaveis, mensagens de erro acessiveis | | Textarea | Area de texto com contador de caracteres (aria-live="polite"), maxLength, label associada | | Menu | Dropdown seguindo o padrao WAI-ARIA Menu Button com navegacao completa por teclado | | Card | Card semantico com <article>, stretched-link, focus-within visivel, subcomponentes compostos |

Acessibilidade

  • Navegacao por teclado (Tab, Enter, Escape, setas)
  • Atributos ARIA (aria-expanded, aria-haspopup, aria-invalid, aria-describedby, aria-live, aria-busy)
  • Compatibilidade com leitores de tela
  • Focus visible em todos os elementos interativos
  • Alvos de toque minimo de 44x44px (WCAG 2.5.5)
  • Respeito a prefers-reduced-motion
  • Skip-link no layout

Instalacao

npm install acessibilidade-react

Uso

import { Button, Input, Menu, MenuButton, MenuItem, MenuList, Card, CardHeader, CardBody, CardFooter } from 'acessibilidade-react';

// Button
<Button variant="primary" size="md">Enviar</Button>

// Input com validacao
<Input label="E-mail" type="email" required error="E-mail invalido" />

// Menu dropdown
<Menu>
  <MenuButton>Opcoes</MenuButton>
  <MenuList>
    <MenuItem onSelect={() => console.log('Perfil')}>Perfil</MenuItem>
    <MenuItem onSelect={() => console.log('Sair')}>Sair</MenuItem>
  </MenuList>
</Menu>

// Card
<Card href="/produto/1">
  <CardHeader><h2><a href="/produto/1">Produto</a></h2></CardHeader>
  <CardBody>Descricao do produto</CardBody>
  <CardFooter><Button size="sm">Comprar</Button></CardFooter>
</Card>

Scripts

npm run dev           # Servidor de desenvolvimento Next.js
npm test              # Rodar todos os testes (92 testes)
npm run test:coverage # Testes com relatorio de cobertura
npm run build:lib     # Compilar biblioteca para dist/ (CJS + ESM + tipos)
npm run storybook     # Iniciar Storybook na porta 6006
npm run build         # Build do site de demonstracao Next.js
npm run lint          # Linting com eslint-plugin-jsx-a11y

Estrutura do Projeto

src/
  components/
    Button/     # Button.tsx, .test.tsx, .stories.tsx, .types.ts
    Form/       # Input, Select, Textarea, FormField + testes e stories
    Menu/       # Menu, MenuButton, MenuItem, MenuList + testes e stories
    Card/       # Card, CardHeader, CardBody, CardFooter + testes e stories
  utils/
    cn.ts       # Utilitario para merge de classes Tailwind
  index.ts      # Barrel export da biblioteca

app/
  layout.tsx    # Layout com skip-link, nav e landmarks ARIA
  page.tsx      # Landing page
  demo/
    buttons/    # Demo do Button
    forms/      # Demo dos formularios
    menus/      # Demo do Menu
    cards/      # Demo do Card

Tecnologias

  • React 19 + TypeScript
  • Next.js 15 (site de demonstracao)
  • Tailwind CSS v4
  • Jest + Testing Library + jest-axe (testes de acessibilidade)
  • Storybook 10 + addon-a11y
  • tsup (build da biblioteca)
  • eslint-plugin-jsx-a11y

Testes

92 testes cobrindo:

  • Renderizacao e semantica HTML
  • Atributos ARIA
  • Navegacao por teclado (Tab, Enter, Escape, setas)
  • Estados (disabled, loading, erro)
  • Validacao automatica com jest-axe (sem violacoes WCAG)

Autor

Dorival Soares da Silva Junior Engenharia de Software - UTFPR Campus Dois Vizinhos Orientador: Prof. Dr. Erinaldo da Silva Pereira

Licenca

MIT