-
Notifications
You must be signed in to change notification settings - Fork 613
[FEATURE]: Add keyboard handlers to interactive elements #2167
Copy link
Copy link
Labels
COULDP3: Nice-to-have features with minimal impact if left out; included if time permitsP3: Nice-to-have features with minimal impact if left out; included if time permitsenhancementNew feature or requestNew feature or requestfrontendFrontend development (HTML, CSS, JavaScript)Frontend development (HTML, CSS, JavaScript)sonarSonarQube code quality findingsSonarQube code quality findingsuiUser InterfaceUser Interface
Milestone
Description
Problem
24 HTML elements have onclick handlers but no keyboard equivalents, making them inaccessible to keyboard users.
SonarQube Rule: Web:MouseEventWithoutKeyboardEquivalentCheck
Severity: MINOR
Affected Files
| File | Count |
|---|---|
mcpgateway/templates/overview_partial.html |
24 |
Fix Strategy
Add onkeypress, onkeydown, or onkeyup handlers, or use semantic HTML elements like <button> that have built-in keyboard support.
<!-- BAD -->
<div onclick="doSomething()">Click me</div>
<!-- GOOD - Option 1: Add keyboard handler -->
<div onclick="doSomething()" onkeypress="doSomething()" tabindex="0" role="button">Click me</div>
<!-- GOOD - Option 2: Use semantic element -->
<button onclick="doSomething()">Click me</button>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
COULDP3: Nice-to-have features with minimal impact if left out; included if time permitsP3: Nice-to-have features with minimal impact if left out; included if time permitsenhancementNew feature or requestNew feature or requestfrontendFrontend development (HTML, CSS, JavaScript)Frontend development (HTML, CSS, JavaScript)sonarSonarQube code quality findingsSonarQube code quality findingsuiUser InterfaceUser Interface