Conversation
…tion - Updated `getDisplaySetInfo` to ensure local file frame imageIds resolve correctly, falling back to the source multiframe instance when necessary. - Improved instance filtering in `isDisplaySetReconstructable` to handle undefined instances more robustly. - Modified `App` prop types to make `routerBasename` optional and added new props for loading indicators and data sources. - Refactored `CinePlayer` component to replace Button with a div for better accessibility and interaction.
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| @@ -129,7 +130,7 @@ const CinePlayer: React.FC<CinePlayerProps> = ({ | |||
| </div> | |||
| </Numeric.NumberStepper> | |||
| </Numeric.Container> | |||
| </Button> | |||
| </div> | |||
There was a problem hiding this comment.
Missing keyboard activation on
role="button" div
Replacing <Button> with <div role="button"> removes native keyboard activation. A <button> fires a click event on both Enter and Space by default; a <div> does not, even with role="button" and tabIndex={0}. Radix UI's PopoverTrigger with asChild merges an onClick handler onto the child element, but that handler is only invoked on pointer clicks, not keydown events. Keyboard users who tab to this element and press Enter or Space will get no response and cannot open the FPS popover.
An onKeyDown handler that calls setPopoverOpen when Enter or Space is pressed is needed to restore keyboard accessibility.
Prompt To Fix With AI
This is a comment left during a code review.
Path: platform/ui-next/src/components/CinePlayer/CinePlayer.tsx
Line: 106-133
Comment:
**Missing keyboard activation on `role="button"` div**
Replacing `<Button>` with `<div role="button">` removes native keyboard activation. A `<button>` fires a `click` event on both Enter and Space by default; a `<div>` does not, even with `role="button"` and `tabIndex={0}`. Radix UI's `PopoverTrigger` with `asChild` merges an `onClick` handler onto the child element, but that handler is only invoked on pointer clicks, not keydown events. Keyboard users who tab to this element and press Enter or Space will get no response and cannot open the FPS popover.
An `onKeyDown` handler that calls `setPopoverOpen` when Enter or Space is pressed is needed to restore keyboard accessibility.
How can I resolve this? If you propose a fix, please make it concise.
Viewers
|
||||||||||||||||||||||||||||
| Project |
Viewers
|
| Branch Review |
ptmeta
|
| Run status |
|
| Run duration | 02m 18s |
| Commit |
|
| Committer | sedghi |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
0
|
|
|
37
|
| View all changes introduced in this branch ↗︎ | |
…tion
getDisplaySetInfoto ensure local file frame imageIds resolve correctly, falling back to the source multiframe instance when necessary.isDisplaySetReconstructableto handle undefined instances more robustly.Appprop types to makerouterBasenameoptional and added new props for loading indicators and data sources.CinePlayercomponent to replace Button with a div for better accessibility and interaction.Context
Changes & Results
Testing
Checklist
PR
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment
Greptile Summary
This PR adds null-safety fixes for multiframe instance handling (filtering undefined instances, guarding
NumberOfFrames), relaxesAppprop requirements, and refactors theCinePlayerFPS trigger from a<Button>to a<div role=\"button\">.<div role=\"button\">inCinePlayeris missing anonKeyDownhandler for Enter/Space. Because<div>elements don't fire click events on keydown natively and Radix'sPopoverTriggerrelies on that native behavior, keyboard users cannot open the FPS popover — a concrete accessibility regression versus the<Button>it replaces.Confidence Score: 4/5
Safe to merge after addressing the missing keyboard handler on the FPS popover trigger in CinePlayer.
The null-safety and prop-type changes are straightforward and correct. The CinePlayer change introduces a P1 accessibility regression by removing native keyboard activation without providing a replacement handler.
platform/ui-next/src/components/CinePlayer/CinePlayer.tsx — missing onKeyDown for keyboard activation of the FPS popover trigger.
Important Files Changed
<Button>with<div role="button" tabIndex={0}>as PopoverTrigger child, but omits onKeyDown handler — keyboard users cannot activate the FPS popover via Enter/Space..filter(Boolean)guards for local-file frame imageIds that don't resolve to instance objects, with a fallback to the source multiframe instance when all entries are filtered out.routerBasenameand the top-levelconfigprop optional in PropTypes (existing default values already cover the missing-prop case), and adds PropTypes entries forshowLoadingIndicator,showStudyList,modes, anddataSources.Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix: Enhance multiframe instance handlin..." | Re-trigger Greptile
(5/5) You can turn off certain types of comments like style here!