[Bug]: Missing focus-visible indicators on Button and missing focus trap in Modal

Abierto
#1,450 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Siddh2024 ya está trabajando en esto.

Desde el 22/11/2026.

  • #1452 de @Siddh2024 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
javascript, react

Línea de trabajo

Start in packages/ui-elements/src/components/Button/Button.styles.js, where outline: none is set without a :focus-visible replacement, then look at packages/ui-elements/src/components/Modal/Modal.js for the missing focus trap. Reproduce with cd packages/react && npx storybook dev -p 6006 and tab through the JOIN button and the Login modal to confirm both behaviours before changing anything. Done means every button shows a visible keyboard focus ring and Tab/Shift+Tab stay inside an open modal. Note that an open pull request (#1452) already targets this, so check it before starting.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug
Description:

Keyboard navigation across @embeddedchat/ui-elements exhibits two major accessibility compliance issues:

  1. Missing :focus-visible on Button (WCAG 2.4.7 Level AA):
    In packages/ui-elements/src/components/Button/Button.styles.js, outline: none; is set globally without providing an alternate :focus-visible indicator. This causes buttons (such as JOIN, action buttons, modal close, and dialog action buttons) to have invisible focus when navigating via keyboard.

  2. Missing Modal Focus Trap (WCAG 2.1.2 Level A):
    When Modal is opened, keyboard focus escapes the modal container and tabs through background elements behind the modal before cycling back.

Steps to reproduce:
  1. Open Storybook: cd packages/react && npx storybook dev -p 6006
  2. Open http://localhost:6006/iframe.html?id=embeddedchat-simple--simple&viewMode=story
  3. Press Tab — notice no visual focus ring appears on the JOIN button (despite receiving DOM focus).
  4. Press Enter to open the Login modal.
  5. Tab past the form elements — notice focus escapes the modal and navigates through invisible background elements.
Expected behavior:
  • All interactive buttons should have a distinct, visible :focus-visible outline for keyboard users.
  • Modal should trap keyboard focus within the dialog while open.
Proposed Solution:

I would like to resolve this in @embeddedchat/ui-elements:

  • Add accessible :focus-visible styles in Button.styles.js.
  • Implement focus trapping in Modal.js so Tab / Shift+Tab cycles only through elements within the open modal dialog.

May I be assigned this issue?

Lenguaje dominante
JavaScript
Estrellas
171
Forks
421
Merge medio
3 d 6 h
PR fusionados (30 d)
4

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de RocketChat/EmbeddedChat

Todos los issues de RocketChat/EmbeddedChat

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.