Skip to content

Enable context menu from keyboard in History view #17035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 10, 2023

Conversation

sergiou87
Copy link
Member

@sergiou87 sergiou87 commented Jul 5, 2023

xref. https://github.com/github/accessibility-audits/issues/4916

Description

This PR moves context menu control from the CommitListItem to the CommitList in order to make it accessible via keyboard.

Release notes

Notes: [Improved] The context menu for the History view items can be invoked by keyboard shortcuts

@sergiou87 sergiou87 marked this pull request as ready for review July 6, 2023 16:49
@@ -31,31 +23,20 @@ interface ICommitProps {
readonly commit: Commit
readonly selectedCommits: ReadonlyArray<Commit>
readonly emoji: Map<string, string>
readonly isLocal: boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dude. I think this was the roughest one so far since the commit list items have so many things. :P

@@ -289,6 +269,15 @@ export class CommitList extends React.Component<ICommitListProps, {}> {
return undefined
}

private get selectedCommits() {
Copy link
Contributor

@tidy-dev tidy-dev Jul 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice tidy convenience functions added in this file.

Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✨ Works as expected!

I only did a cursory regression test on macOS against it to just make sure all the context menu items fire. Looks like a pretty straight forwards lift and shift, thus, I don't see anything to indicate a regression would be present famous last words.

@sergiou87 sergiou87 merged commit e0f1f90 into development Jul 10, 2023
@sergiou87 sergiou87 deleted the history-keyboard-context-menu branch July 10, 2023 11:39
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.

2 participants