Skip to content
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

Add type-ahead to assign tester dropdown #1095

Merged
merged 3 commits into from
May 20, 2024

Conversation

Paul-Clue
Copy link
Collaborator

see issue #991

This pull request updates the assign tester menu to support type-ahead.

@Paul-Clue Paul-Clue requested a review from howard-e May 14, 2024 13:56
Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

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

Well done! I've left an inline comment on the regex requiring a change, should be good to go after that!

@@ -113,9 +113,33 @@ const AssignTesterDropdown = ({
const clearAriaLiveRegion = () => {
setAlertMessage('');
};

const handleKeyDown = event => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting!


const handleKeyDown = event => {
const { key } = event;
if (key.match(/[a-z]/)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (key.match(/[a-z]/)) {
if (key.match(/[0-9a-zA-Z]/)) {

While there are none currently tracked by the app, I've come to find out GitHub usernames can begin with a number, so just to be safe. Uppercase is there as well in case one is holding Shift or CapsLock is enabled. It seems to also align with browsers' native behavior for <select>

Copy link
Contributor

@howard-e howard-e left a comment

Choose a reason for hiding this comment

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

Looks good!

@howard-e howard-e merged commit b6a5f54 into development May 20, 2024
2 checks passed
@howard-e howard-e deleted the type-ahead-for-tester-dropdown branch May 20, 2024 14:20
@howard-e howard-e mentioned this pull request May 28, 2024
howard-e added a commit that referenced this pull request May 28, 2024
Issues addressed:
* #1105, addresses w3c/aria-at#1070
* #1053, addresses w3c/aria-practices#2971
* #1097, addresses #977
* #1095, addresses #991
* #1093, addresses #934
* #1000, addresses #818
* #1089, addresses #992
* #1067, addresses #993
* #1056, addresses w3c/wai-aria-practices#212

---------

Co-authored-by: alflennik <[email protected]>
Co-authored-by: Paul Clue <[email protected]>
Co-authored-by: Mx Corey Frang <[email protected]>
Co-authored-by: Mx. Corey Frang <[email protected]>
Co-authored-by: Erika Miguel <[email protected]>
Co-authored-by: Mike Pennisi <[email protected]>
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