Skip to content

🎨 Palette: Add keyboard accessibility to FastMCP status badge - #46

Closed
jasandroidx wants to merge 1 commit into
ravenstackfrom
palette-fastmcp-badge-a11y-7100615600516754420
Closed

jasandroidx wants to merge 1 commit into
ravenstackfrom
palette-fastmcp-badge-a11y-7100615600516754420

Conversation

@jasandroidx

Copy link
Copy Markdown
Owner

This PR implements a micro-UX enhancement to improve the accessibility of the interactive `FastMCPStatusBadge` component.

πŸ’‘ What:

Added `role="button"`, `tabIndex={0}`, `onKeyDown` (Enter/Space), `aria-label`, and `focus-visible` styling to the FastMCPStatusBadge component.

🎯 Why:

The FastMCP status badge is interactive and triggers a network check when clicked. However, because it was implemented using a generic `div` element instead of a native ``, it was entirely unreachable and unusable for users navigating with a keyboard or screen reader.

β™Ώ Accessibility:

  • Users can now navigate to the badge using the Tab key.
  • Users can trigger the status check using Enter or Space.
  • Screen readers now announce the element as a button and read its current connection status.
  • A visual focus outline is provided specifically for keyboard navigation to clearly indicate focus without interfering with mouse interactions.

PR created automatically by Jules for task 7100615600516754420 started by @jasandroidx

This commit improves the accessibility of the FastMCP status badge in the Keep interface.
Previously, the badge was implemented as a generic \`div\` element with an \`onClick\` handler,
rendering it inaccessible to keyboard users and screen readers.

The following attributes and behaviors have been added to the interactive \`div\`:
- \`role="button"\`: Semantically identifies the element as a button.
- \`tabIndex={0}\`: Allows the element to be focused via the keyboard (Tab key).
- \`aria-label\`: Provides an accessible name for screen readers indicating its function and status.
- \`onKeyDown\`: A custom event handler that triggers the check action when the Enter or Space keys are pressed.
- \`focus-visible:outline-none focus-visible:ring-2 ...\`: Adds visible focus styling using Tailwind CSS to indicate when the element is focused via the keyboard.

Co-authored-by: jasandroidx <77057656+jasandroidx@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@jasandroidx

Copy link
Copy Markdown
Owner Author

Closing as duplicate β€” the FastMCP badge keyboard-accessibility work landed via #53 (real + aria-label + focus-visible hover card). This PR is the same one-file change on a stale base.

@google-labs-jules

Copy link
Copy Markdown
Contributor

Closing as duplicate β€” the FastMCP badge keyboard-accessibility work landed via #53 (real + aria-label + focus-visible hover card). This PR is the same one-file change on a stale base.

Understood. Acknowledging that this PR is a duplicate and is now closed. Stopping work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant