tju-yxq opened a new issue, #5585:
URL: https://github.com/apache/rocketmq-dashboard/issues/5585

   ## Problem
   
   Five interactive affordances across the console work only with a mouse — 
keyboard users cannot trigger them at all, and screen readers announce them as 
static text with no button semantics:
   
   1. **Query history rows** (`components/MessageQueryHistoryDrawer.tsx`, both 
the messages and traces tables): re-running a saved query from history requires 
clicking the row. The `onRow` config supplies only `onClick` + a pointer 
cursor; there is no keyboard handler, no focus, and the columns contain no 
action button — row click is the **only** path, so this drawer's core function 
is mouse-only.
   
   2. **Conversation titles** (`ai/components/ConversationListModal.tsx`): the 
conversation title renders as `Typography.Text` (a `<span>`) with `onClick`; it 
is the only way to open/switch to a conversation from the history modal (the 
action column only has archive/delete). No role, no `tabIndex`, no keyboard 
handler.
   
   3. **Quick-prompt chips** (`ai/components/Composer.tsx`): the composer's 
quick-action chips are antd `Tag` spans with `onClick` — not focusable, not 
activable by keyboard, no button semantics. The same repo implements clickable 
Tags correctly in `alerts.tsx` (notification-template variables: 
`role="button"` + `tabIndex` + Enter/Space `onKeyDown`), so the convention 
exists and these chips predate it.
   
   4. **"View All" link** (`home/dashboard.tsx`): `<a onClick={...}>` without 
`href`. Per HTML spec, an anchor without `href` is not focusable, is not 
announced as a link, and cannot be activated by keyboard.
   
   5. **Auto-refresh toggle state** (`instance/consumer.tsx`): the "自动刷新" 
toggle conveys on/off solely through button styling (primary/ghost + spinning 
icon). Without `aria-pressed`, a screen reader gets no feedback on whether 
auto-refresh is now on. The app's own theme toggle (MainLayout) and the audit 
page's tags do announce state.
   
   ## Expected Behavior
   
   - The two history tables' rows become focusable and activate on Enter/Space.
   - The conversation title and quick-prompt chips get `role="button"`, 
`tabIndex={0}`, and Enter/Space handlers (the established 
`alerts.tsx`/`audit.tsx` patterns).
   - The "View All" anchor gets an `href` (SPA navigation preserved via 
`preventDefault` + `navigate`).
   - The auto-refresh button adds `aria-pressed`.
   
   Every fix follows a pattern already present in this codebase — this PR 
applies the repo's own convention to the five sites that missed it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to