-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
The ExtensionItem component in the UI has accessibility issues due to nested interactive elements. The Card component (a div) has an onClick handler that toggles the extension, while also containing a Switch and a settings button (Gear icon) that are independently clickable. This creates several problems:
This is an accessibility issue and creates a poor user experience because:
- The Card shouldn't be clickable - that's what the Switch toggle is for and divs shouldn't contain click events
- Users accidentally click the card area (I do this all the time 😅) when trying to read extension details, unintentionally toggling the extension
- Having both the card and the switch toggle is confusing and unnecessary
To Reproduce
Steps to reproduce the behavior:
- Navigate to Settings → Extensions in the Goose Desktop app
- Use keyboard navigation (Tab key) to move through extension cards
- Observe that focus indicators and interaction expectations are unclear
- Use a screen reader to navigate the extensions list
- Notice the lack of clear semantic information about interactive elements
Expected behavior
The Card itself should not be clickable. Only the interactive controls within it (the Switch and optional Settings button) should respond to user interaction. Each interactive element should have:
- Proper ARIA labels describing its purpose
- Clear focus indicators for keyboard navigation
- Semantic HTML that communicates functionality to assistive technologies
- No nested click handlers requiring event propagation management
Proposed Solution
Remove the onClick handler from the <Card /> component and remove the onClick={(e) => e.stopPropagation()} from the <CardAction /> component. Add proper ARIA labels to the Switch and Settings button. Remove hover:cursor-pointer from the Card since it's no longer clickable.
Please provide the following information
- OS & Arch: [All platforms]
- Interface: UI
- Version: [Current version]
- Component:
ui/desktop/src/components/settings/extensions/ExtensionItem.tsx
Additional context
It doesn't affect keyboard navigation as the div is not focusable by default.
