[Bug]: CheckBox is keyboard-inaccessible (display: none), missing focus indicators, and lacks uncontrolled state support
Mantenedores costumam responder em até 1 dia
@atanunath66-stack já está trabalhando nisso.
Desde 24/11/2026.
- #1462 de @atanunath66-stack — aberto
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- Meio dia
- Facilidade para iniciantes
- 68/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- javascript, react
- Domínio
- accessibility, frontend
Direção de pesquisa
Start in packages/ui-elements at CheckBox.js, where the <input> is hidden with style={{ display: 'none' }}, and read CheckBox.styles.js for the outline: none rule; the story to update lives in CheckBox.stories.js. Reproduce first with cd packages/ui-elements && npx storybook dev -p 6006, tabbing through the default story to confirm the checkbox is skipped. Done means the input stays in the tab order and accessibility tree (visually-hidden CSS rather than display: none), a :focus-visible ring using theme.colors.ring appears, Space toggles it, defaultChecked works uncontrolled, and the jsx-a11y suppression is removed.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Description:
The CheckBox component in @embeddedchat/ui-elements has several accessibility and usability compliance issues:
-
Inaccessible to Keyboard & Assistive Technologies (WCAG 2.1.1, WCAG 4.1.2):
The underlying<input type="checkbox">is hidden usingstyle={{ display: 'none' }}inCheckBox.js. In all modern browsers,display: 'none'completely removes the input from the accessibility tree and eliminates it from the keyboardTaborder. Consequently:- Keyboard users cannot tab to the checkbox or toggle it using
Space. - Screen readers completely skip it.
- The accessibility linter warning was suppressed with
// eslint-disable-next-line jsx-a11y/label-has-associated-control.
- Keyboard users cannot tab to the checkbox or toggle it using
-
Missing
:focus-visibleOutline (WCAG 2.4.7 Level AA):
CheckBox.styles.jssetsoutline: none;without providing an accessible:focus-visiblering when the checkbox receives focus. -
Lacks Uncontrolled Mode & Interactive State Handling:
CheckBox.jsdoes not manage internal state when used as an uncontrolled input (defaultChecked), and strictly binds tochecked={checked}. When rendered in Storybook or when used without external controller state, the checkbox is completely frozen and does not toggle on click or change.
Steps to reproduce:
- Start Storybook:
cd packages/ui-elements && npx storybook dev -p 6006 - Open
http://localhost:6006/iframe.html?id=components-checkbox--default&viewMode=story - Click on the canvas and press
Tab— observe that the checkbox is completely skipped and cannot receive keyboard focus. - Press
Space— observe that it cannot be toggled via keyboard. - Inspect the DOM in browser DevTools: observe
<input type="checkbox" style="display: none;">and that the Accessibility pane lists the input as not exposed to the accessibility API. - Click the checkbox in the story — observe that it does not toggle because state is locked without uncontrolled support.
Expected behavior:
- The native
<input type="checkbox">should use accessible visually-hidden CSS (e.g.position: absolute; opacity: 0; pointer-events: none;) instead ofdisplay: 'none', keeping it in the DOM accessibility tree and tab order. - The checkbox should display a visible
:focus-visibleoutline matchingtheme.colors.ringwhen focused via keyboard. - Pressing
Spaceshould toggle the checkbox. CheckBoxshould support both controlled (checked+onChange) and uncontrolled (defaultChecked) patterns.- The Storybook story should be interactive.
Proposed Solution:
I would like to resolve this in @embeddedchat/ui-elements:
- Replace
display: 'none'with standard visually-hidden CSS. - Add
:focus-visiblefocus ring styles inCheckBox.styles.js. - Add support for both controlled (
checked) and uncontrolled (defaultChecked/ internal state) usage. - Remove the disabled
jsx-a11y/label-has-associated-controllinter suppression. - Update
CheckBox.stories.jsto allow interactive toggling.
May I be assigned this issue?
- Linguagem predominante
- JavaScript
- Estrelas
- 171
- Forks
- 421
- Merge médio
- 3d 6h
- PRs com merge (30d)
- 4
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de RocketChat/EmbeddedChat
-
Bug: username fallback in updateUserUsername never runs since the ddp-client migrationTalvez já em andamento @MuhammadFaizan-prog assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
RocketChat/EmbeddedChat#1489 ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: Low contrast on color swatch borders in Theme Lab (Layout Editor)Talvez já em andamento @yashsarvaiya45 assumiu hoje. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
RocketChat/EmbeddedChat#1486 ·
Mantenedores costumam responder em até 1 dia
-
bug(api): _doConnect swallows connection/auth errors and marks failed sessions as authenticatedTalvez já em andamento @ashwanisingh011 assumiu há 1 dia. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
RocketChat/EmbeddedChat#1484 ·
Mantenedores costumam responder em até 1 dia
-
Bug: White screen crash (`Cannot read properties of undefined (reading 'members')`) when rendering UserMention outside MarkupInteractionContextTalvez já em andamento @swarnendusahu10-dotcom assumiu há 2 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
RocketChat/EmbeddedChat#1482 ·
Mantenedores costumam responder em até 1 dia
-
Bug: UIKit PreviewBlock cover image tiles repeatedly and stretches across viewport when zoomed outTalvez já em andamento @swarnendusahu10-dotcom assumiu há 3 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
RocketChat/EmbeddedChat#1480 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de RocketChat/EmbeddedChat
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Life-Framework/Life-Framework#7017 ·
Mantenedores costumam responder em até 1 dia
-
e/DevOps enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
Accenture/sfmc-devtools#2795 ·
Mantenedores costumam responder em até 1 dia
-
agent/guide documentation help wanted stage/010-actionable
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
kubestellar/console-kb#4003 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
FilOzone/synapse-sdk#1201 · 1 comentário ·
Mantenedores costumam responder em até 1 dia