You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zjncs (via GitHub)" <gi...@apache.org> on 2026/09/20 05:08:05 UTC

[PR] fix(audit): let the timeline target be activated from the keyboard [rocketmq-dashboard]

zjncs opened a new pull request, #4580:
URL: https://github.com/apache/rocketmq-dashboard/pull/4580

   <!-- Make sure the base branch is `master`: that is the RocketMQ Studio trunk. -->
   
   ### Which Issue(s) This PR Fixes
   
   - Fixes #<issue-id> (trivial a11y fix, no issue)
   
   ### Brief Description
   
   The audit table renders an operation's **target** as the only entry point into the resource operation timeline, but it is a plain click-only `Text` node: it is not reachable with `Tab` and ignores `Enter` / `Space`, so keyboard users cannot open a timeline at all.
   
   This follows the convention already used for the notification template variable tags in `alerts.tsx`: mark the node as `role="button"` with `tabIndex={0}` and an `aria-label`, and activate the timeline on `Enter` or `Space` with `preventDefault` (so the page does not scroll on Space while opening the timeline).
   
   ### How Did You Test This Change?
   
   Web suite, run from the repo root (the `NODE_OPTIONS` flag is only needed on this machine — Node 25's native `localStorage` global otherwise shadows jsdom's; CI does not need it):
   
   ```
   NODE_OPTIONS=--no-experimental-webstorage npx --prefix web vitest run --root web src/pages/ops/__tests__/AuditPage.test.tsx
   # before the fix: new keyboard test fails (element has no button role / no key handling)
   # after the fix:  11 passed (11)
   
   NODE_OPTIONS=--no-experimental-webstorage npx --prefix web vitest run --root web
   # Test Files  122 passed (122)
   #      Tests  1035 passed (1035)
   
   npx --prefix web tsc -p web --noEmit   # no errors
   npm --prefix web run lint              # 0 problems
   ```
   
   The new test focuses the target, fires `keyDown` Enter, and asserts the timeline dialog opens and the audit query is scoped to that record's `resourceType` / `target` / `clusterId`.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in
   - [x] Commit subject follows Conventional Commits (`feat:` / `fix:` / `refactor:` / `chore:` / `docs:` / `perf:`)
   - [x] Tests added or updated for non-trivial changes, test methods named `...Test`
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/`
   - [ ] Architecture constraints stay green (`mvn test` runs the ArchUnit checks) — N/A, web-only change
   - [ ] New source files carry the ASF license header — no new files
   - [ ] Documentation touched where behaviour changed (README / `docs/` / in-app help) — N/A, no behaviour change for mouse users


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(audit): let the timeline target be activated from the keyboard [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins merged PR #4580:
URL: https://github.com/apache/rocketmq-dashboard/pull/4580


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org