[Bug]: Missing focus-visible indicators on Button and missing focus trap in Modal
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript, react
- Domain
- accessibility, frontend
Research direction
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.
Written by the indexing model from the issue text.
Description
Description:
Keyboard navigation across @embeddedchat/ui-elements exhibits two major accessibility compliance issues:
-
Missing
:focus-visibleon Button (WCAG 2.4.7 Level AA):
Inpackages/ui-elements/src/components/Button/Button.styles.js,outline: none;is set globally without providing an alternate:focus-visibleindicator. This causes buttons (such asJOIN, action buttons, modal close, and dialog action buttons) to have invisible focus when navigating via keyboard. -
Missing Modal Focus Trap (WCAG 2.1.2 Level A):
WhenModalis opened, keyboard focus escapes the modal container and tabs through background elements behind the modal before cycling back.
Steps to reproduce:
- Open Storybook:
cd packages/react && npx storybook dev -p 6006 - Open
http://localhost:6006/iframe.html?id=embeddedchat-simple--simple&viewMode=story - Press
Tab— notice no visual focus ring appears on the JOIN button (despite receiving DOM focus). - Press
Enterto open the Login modal. - 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-visibleoutline for keyboard users. Modalshould trap keyboard focus within the dialog while open.
Proposed Solution:
I would like to resolve this in @embeddedchat/ui-elements:
- Add accessible
:focus-visiblestyles inButton.styles.js. - Implement focus trapping in
Modal.jssoTab/Shift+Tabcycles only through elements within the open modal dialog.
May I be assigned this issue?
- Dominant language
- JavaScript
- Stars
- 171
- Forks
- 421
- Avg merge
- 3d 6h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RocketChat/EmbeddedChat
-
Bug: username fallback in updateUserUsername never runs since the ddp-client migrationPossibly taken @MuhammadFaizan-prog claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RocketChat/EmbeddedChat#1489 ·
Maintainers usually reply within 1 day
-
[Bug]: Low contrast on color swatch borders in Theme Lab (Layout Editor)Possibly taken @yashsarvaiya45 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
RocketChat/EmbeddedChat#1486 ·
Maintainers usually reply within 1 day
-
bug(api): _doConnect swallows connection/auth errors and marks failed sessions as authenticatedPossibly taken @ashwanisingh011 claimed this 1 day ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
RocketChat/EmbeddedChat#1484 ·
Maintainers usually reply within 1 day
-
Bug: White screen crash (`Cannot read properties of undefined (reading 'members')`) when rendering UserMention outside MarkupInteractionContextPossibly taken @swarnendusahu10-dotcom claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RocketChat/EmbeddedChat#1482 ·
Maintainers usually reply within 1 day
-
Bug: UIKit PreviewBlock cover image tiles repeatedly and stretches across viewport when zoomed outPossibly taken @swarnendusahu10-dotcom claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
RocketChat/EmbeddedChat#1480 · 1 comment ·
Maintainers usually reply within 1 day
All issues in RocketChat/EmbeddedChat
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
[Docs] CONTRIBUTING.md links to retired GitHub Learning Lab and Try Git sitesPossibly taken @adityamukesh claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
reillywalter/win-dev-doctor#92 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100