BBBCheckbox: no visible keyboard focus, and the label ignores disabled
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- accessibility, frontend
Research direction
Start in src/components/Checkbox/styles.ts, where StyledCheckbox sets padding: 0 on .MuiCheckbox-root and Label sets the cursor, then in component.tsx where Label is rendered and disabled is available. Check the focus outline in src/components/Button/styles.ts to find the token to reuse, and confirm how .Mui-focusVisible is applied when tabbing. Done when keyboard focus shows a visible outline and a disabled checkbox's label uses not-allowed cursor and the disabled text color.
Written by the indexing model from the issue text.
Description
Describe the bug
BBBCheckbox has two state-styling gaps.
- There is no visible keyboard focus.
StyledCheckboxsetspadding: 0on.MuiCheckbox-root, so MUI's focus ripple only tints the inside of the 21px box. On a light background it is a faint grey square, easy to miss. Nothing else marks focus: there's no outline and no.Mui-focusVisiblestyle. With MUI's default 9px padding, the same ripple shows as a 39px halo.BBButton, for comparison, draws a 2px outline on focus (&&:focus). - The label ignores
disabled.Labelalways hascursor: pointerand the default text color. The component doesn't passdisabledto it (component.tsx). Withdisabled, MUI dims the box, but the label still looks and points as if it were clickable.
To Reproduce
- Render
<BBBCheckbox label="Whole image" checked={false} onChange={() => {}} />. - Tab to it. The only focus cue is a faint tint inside the box.
- Render it with
disabledand hover the label. The cursor is a pointer and the label text isn't dimmed.
Expected behavior
- Focus: a clearly visible focus indicator when focused from the keyboard (
:focus-visible/.Mui-focusVisible), consistent withBBButton's focus outline. WCAG 2.4.7 (Focus Visible) requires one. - Disabled: when
disabled, the label showscursor: not-allowed(ordefault) and the disabled text color, like the box.
Actual behavior
- Focus: a faint grey square inside the 21px box.
- Disabled: the label keeps
cursor: pointerand full-contrast text.
Screenshots
Can add if useful. On keyboard focus, the box shows a light grey fill inside its 21px border and nothing outside it.
BBB version, plugin in which the bug happened and SDK version:
- bbb-ui-components-react 0.9.0, and
developat ccef0a330. - Found while switching the BigBlueButton 4.0 client's camera settings ("Whole image" brightness option) from its own MUI checkbox to
BBBCheckbox.
Desktop (please complete the following information):
- OS: Linux
- Browser: Chromium
- Version: Playwright's bundled Chromium
Additional context
A possible fix:
export const StyledCheckbox = styled(MuiCheckbox)`
&.MuiCheckbox-root { padding: 0; }
&.Mui-checked { color: ${colorBrand1}; }
&.Mui-focusVisible { outline: 2px solid <same token as BBButton's focus outline>; outline-offset: 2px; }
`;
export const Label = styled.label<{ $disabled?: boolean }>`
...
cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};
${({ $disabled }) => $disabled && `color: <disabled text token>;`}
`;
The component would pass $disabled={props.disabled} to Label.
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 5
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 12
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 bigbluebutton/bbb-ui-components-react
-
BBButton: subtle variant with neutral color has an opaque white background, so it renders white on white in dark modeMay be free again @nisatsama claimed this 9 days ago, and no pull request is open. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
bigbluebutton/bbb-ui-components-react#100 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
bigbluebutton/bbb-ui-components-react#107 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 Half a day Newbie friendliness 55/100
bigbluebutton/bbb-ui-components-react#106 ·
Maintainers usually reply within 2 days
-
Difficulty 3/5 Half a day Newbie friendliness 45/100
bigbluebutton/bbb-ui-components-react#105 ·
Maintainers usually reply within 2 days
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 30/100
bigbluebutton/bbb-ui-components-react#87 ·
Maintainers usually reply within 2 days
All issues in bigbluebutton/bbb-ui-components-react
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
juice-shop/juice-shop#3686 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
dsh-market/dsh-market#877 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ScottKirvan/GOMAC#61 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-dev-skill#151 ·
Maintainers usually reply within 1 day