Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(menu): enable numpad arrow and Enter keys #4487

Conversation

nikkimk
Copy link
Contributor

@nikkimk nikkimk commented May 23, 2024

Description

Handles keydown event by event.key instead of event.code so that numpad keys will work with menu.

Related issue(s)

How has this been tested?

  • Test case 1
    1. Go here
    2. Do this
  • Test case 2
    1. Go here
    2. Do this

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

@nikkimk nikkimk linked an issue May 23, 2024 that may be closed by this pull request
1 task
Copy link

Branch preview

Visual regression test results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

@nikkimk nikkimk closed this May 23, 2024
@nikkimk nikkimk deleted the nikkimk/3751-bug-sp-menu-does-not-honor-numpad-keys-for-arrow-and-enter branch May 23, 2024 14:06
Copy link

github-actions bot commented May 23, 2024

Tachometer results

Chrome

action-bar permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 484 kB 51.01ms - 52.98ms - faster ✔
2% - 8%
1.11ms - 4.30ms
branch 472 kB 53.45ms - 55.95ms slower ❌
2% - 8%
1.11ms - 4.30ms
-

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 647 kB 134.67ms - 137.99ms - faster ✔
4% - 7%
5.95ms - 10.76ms
branch 634 kB 142.94ms - 146.43ms slower ❌
4% - 8%
5.95ms - 10.76ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 604 kB 62.00ms - 63.38ms - faster ✔
5% - 8%
3.28ms - 5.43ms
branch 591 kB 66.22ms - 67.87ms slower ❌
5% - 9%
3.28ms - 5.43ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 603 kB 60.67ms - 61.87ms - faster ✔
5% - 8%
3.04ms - 5.03ms
branch 590 kB 64.51ms - 66.10ms slower ❌
5% - 8%
3.04ms - 5.03ms
-

test-open-close-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 789 kB 1873.59ms - 1876.49ms - unsure 🔍
-0% - +0%
-3.57ms - +0.36ms
branch 777 kB 1875.32ms - 1877.97ms unsure 🔍
-0% - +0%
-0.36ms - +3.57ms
-

test-open-close permalink

Version Bytes Avg Time vs remote vs branch
npm latest 788 kB 1860.58ms - 1863.35ms - unsure 🔍
-0% - +0%
-2.85ms - +1.45ms
branch 775 kB 1861.03ms - 1864.31ms unsure 🔍
-0% - +0%
-1.45ms - +2.85ms
-

card permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 502 kB 37.80ms - 38.51ms - faster ✔
1% - 4%
0.39ms - 1.66ms
branch 489 kB 38.65ms - 39.71ms slower ❌
1% - 4%
0.39ms - 1.66ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 34.76ms - 35.24ms - faster ✔
5% - 7%
1.81ms - 2.55ms
branch 697 kB 36.90ms - 37.46ms slower ❌
5% - 7%
1.81ms - 2.55ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 383.17ms - 391.03ms - faster ✔
3% - 5%
10.89ms - 21.16ms
branch 697 kB 399.82ms - 406.43ms slower ❌
3% - 5%
10.89ms - 21.16ms
-

illustrated-message permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 404 kB 13.68ms - 13.90ms - unsure 🔍
-8% - +1%
-1.14ms - +0.13ms
branch 393 kB 13.67ms - 14.92ms unsure 🔍
-1% - +8%
-0.13ms - +1.14ms
-

menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 475 kB 204.77ms - 208.40ms - faster ✔
2% - 4%
3.90ms - 9.34ms
branch 463 kB 211.18ms - 215.23ms slower ❌
2% - 5%
3.90ms - 9.34ms
-

overlay permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 673 kB 426.66ms - 431.17ms - faster ✔
0% - 2%
0.71ms - 7.36ms
branch 662 kB 430.51ms - 435.40ms slower ❌
0% - 2%
0.71ms - 7.36ms
-

directive-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 795 kB 22.17ms - 22.61ms - faster ✔
7% - 10%
1.71ms - 2.37ms
branch 780 kB 24.18ms - 24.67ms slower ❌
8% - 11%
1.71ms - 2.37ms
-

element-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 763 kB 348.38ms - 353.45ms - faster ✔
1% - 3%
4.36ms - 11.32ms
branch 750 kB 356.36ms - 361.14ms slower ❌
1% - 3%
4.36ms - 11.32ms
-

lazy-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 561 kB 40.73ms - 41.49ms - faster ✔
6% - 9%
2.44ms - 3.90ms
branch 548 kB 43.66ms - 44.90ms slower ❌
6% - 10%
2.44ms - 3.90ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 513 kB 541.19ms - 551.09ms - faster ✔
2% - 4%
9.33ms - 22.45ms
branch 500 kB 557.72ms - 566.34ms slower ❌
2% - 4%
9.33ms - 22.45ms
-

popover permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 384 kB 11.71ms - 11.89ms - faster ✔
2% - 4%
0.22ms - 0.51ms
branch 372 kB 12.05ms - 12.28ms slower ❌
2% - 4%
0.22ms - 0.51ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 480 kB 77.06ms - 79.14ms - faster ✔
3% - 6%
2.25ms - 5.36ms
branch 467 kB 80.75ms - 83.06ms slower ❌
3% - 7%
2.25ms - 5.36ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 723 kB 1861.43ms - 1865.58ms - unsure 🔍
-0% - +0%
-4.34ms - +1.95ms
branch 710 kB 1862.33ms - 1867.06ms unsure 🔍
-0% - +0%
-1.95ms - +4.34ms
-

tooltip permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 548 kB 35.09ms - 35.73ms - faster ✔
3% - 5%
1.03ms - 2.00ms
branch 544 kB 36.56ms - 37.29ms slower ❌
3% - 6%
1.03ms - 2.00ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 533 kB 23.88ms - 24.48ms - faster ✔
5% - 9%
1.35ms - 2.35ms
branch 536 kB 25.63ms - 26.44ms slower ❌
6% - 10%
1.35ms - 2.35ms
-

test-element permalink

Version Bytes Avg Time vs remote vs branch
npm latest 656 kB 54.13ms - 55.20ms - faster ✔
4% - 6%
2.12ms - 3.76ms
branch 643 kB 56.98ms - 58.23ms slower ❌
4% - 7%
2.12ms - 3.76ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 632 kB 43.59ms - 44.67ms - faster ✔
6% - 9%
2.73ms - 4.21ms
branch 619 kB 47.10ms - 48.11ms slower ❌
6% - 10%
2.73ms - 4.21ms
-

truncated permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 528 kB 59.33ms - 60.10ms - faster ✔
3% - 5%
2.06ms - 3.41ms
branch 516 kB 61.90ms - 63.00ms slower ❌
3% - 6%
2.06ms - 3.41ms
-
Firefox

action-bar permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 484 kB 115.56ms - 122.24ms - unsure 🔍
-5% - +3%
-6.15ms - +3.19ms
branch 472 kB 117.12ms - 123.64ms unsure 🔍
-3% - +5%
-3.19ms - +6.15ms
-

action-menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 647 kB 284.67ms - 288.73ms - faster ✔
13% - 14%
41.27ms - 48.01ms
branch 634 kB 328.64ms - 334.04ms slower ❌
14% - 17%
41.27ms - 48.01ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 604 kB 135.87ms - 138.77ms - unsure 🔍
-1% - +2%
-0.87ms - +2.59ms
branch 591 kB 135.52ms - 137.40ms unsure 🔍
-2% - +1%
-2.59ms - +0.87ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 603 kB 141.03ms - 148.85ms - slower ❌
1% - 8%
1.90ms - 10.94ms
branch 590 kB 136.25ms - 140.79ms faster ✔
1% - 7%
1.90ms - 10.94ms
-

test-open-close-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 789 kB 1895.80ms - 1902.16ms - unsure 🔍
-0% - +0%
-2.23ms - +5.75ms
branch 777 kB 1894.81ms - 1899.63ms unsure 🔍
-0% - +0%
-5.75ms - +2.23ms
-

test-open-close permalink

Version Bytes Avg Time vs remote vs branch
npm latest 788 kB 1889.20ms - 1894.24ms - unsure 🔍
-0% - +0%
-5.97ms - +2.73ms
branch 775 kB 1889.80ms - 1896.88ms unsure 🔍
-0% - +0%
-2.73ms - +5.97ms
-

card permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 502 kB 69.50ms - 73.30ms - unsure 🔍
-6% - +0%
-4.57ms - +0.05ms
branch 489 kB 72.35ms - 74.97ms unsure 🔍
-0% - +6%
-0.05ms - +4.57ms
-

combobox permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 62.03ms - 64.05ms - unsure 🔍
-2% - +1%
-1.50ms - +0.82ms
branch 697 kB 62.81ms - 63.95ms unsure 🔍
-1% - +2%
-0.82ms - +1.50ms
-

light-dom-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 709 kB 762.58ms - 779.54ms - slower ❌
2% - 6%
15.82ms - 44.18ms
branch 697 kB 729.69ms - 752.43ms faster ✔
2% - 6%
15.82ms - 44.18ms
-

illustrated-message permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 404 kB 26.54ms - 28.22ms - unsure 🔍
-3% - +4%
-0.77ms - +1.13ms
branch 393 kB 26.76ms - 27.64ms unsure 🔍
-4% - +3%
-1.13ms - +0.77ms
-

menu permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 475 kB 436.47ms - 450.41ms - unsure 🔍
-4% - +0%
-17.16ms - +0.88ms
branch 463 kB 445.86ms - 457.30ms unsure 🔍
-0% - +4%
-0.88ms - +17.16ms
-

overlay permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 770 kB 642.36ms - 660.24ms - slower ❌
3% - 6%
19.55ms - 39.17ms
branch 757 kB 617.90ms - 625.98ms faster ✔
3% - 6%
19.55ms - 39.17ms
-

directive-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 773 kB 46.38ms - 47.06ms - faster ✔
4% - 6%
2.01ms - 3.07ms
branch 761 kB 48.85ms - 49.67ms slower ❌
4% - 7%
2.01ms - 3.07ms
-

element-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 763 kB 668.73ms - 680.23ms - slower ❌
4% - 7%
28.03ms - 42.25ms
branch 750 kB 635.17ms - 643.51ms faster ✔
4% - 6%
28.03ms - 42.25ms
-

lazy-test permalink

Version Bytes Avg Time vs remote vs branch
npm latest 561 kB 95.44ms - 104.16ms - unsure 🔍
-1% - +9%
-0.85ms - +8.17ms
branch 548 kB 95.01ms - 97.27ms unsure 🔍
-8% - +1%
-8.17ms - +0.85ms
-

picker permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 513 kB 1012.80ms - 1042.40ms - faster ✔
3% - 6%
36.65ms - 67.31ms
branch 500 kB 1075.59ms - 1083.57ms slower ❌
3% - 7%
36.65ms - 67.31ms
-

popover permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 384 kB 29.57ms - 33.51ms - unsure 🔍
-9% - +9%
-3.00ms - +2.72ms
branch 372 kB 29.60ms - 33.76ms unsure 🔍
-9% - +10%
-2.72ms - +3.00ms
-

slider permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 480 kB 164.16ms - 170.68ms - faster ✔
1% - 7%
2.01ms - 12.11ms
branch 467 kB 170.62ms - 178.34ms slower ❌
1% - 7%
2.01ms - 12.11ms
-

split-button permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 723 kB 1877.16ms - 1881.76ms - unsure 🔍
-0% - +0%
-3.23ms - +3.43ms
branch 710 kB 1876.96ms - 1881.76ms unsure 🔍
-0% - +0%
-3.43ms - +3.23ms
-

tooltip permalink

test-basic

Version Bytes Avg Time vs remote vs branch
npm latest 656 kB 79.47ms - 84.01ms - slower ❌
8% - 15%
5.94ms - 10.74ms
branch 643 kB 72.61ms - 74.19ms faster ✔
8% - 13%
5.94ms - 10.74ms
-

test-directive permalink

Version Bytes Avg Time vs remote vs branch
npm latest 533 kB 47.25ms - 48.95ms - faster ✔
17% - 26%
10.09ms - 16.71ms
branch 521 kB 58.30ms - 64.70ms slower ❌
21% - 35%
10.09ms - 16.71ms
-

test-element permalink

Version Bytes Avg Time vs remote vs branch
npm latest 656 kB 119.50ms - 127.98ms - unsure 🔍
-7% - +1%
-8.71ms - +1.51ms
branch 643 kB 124.48ms - 130.20ms unsure 🔍
-1% - +7%
-1.51ms - +8.71ms
-

test-lazy permalink

Version Bytes Avg Time vs remote vs branch
npm latest 632 kB 93.66ms - 98.34ms - faster ✔
4% - 11%
4.52ms - 11.64ms
branch 619 kB 101.39ms - 106.77ms slower ❌
5% - 12%
4.52ms - 11.64ms
-

truncated permalink

basic-test

Version Bytes Avg Time vs remote vs branch
npm latest 528 kB 101.84ms - 107.32ms - faster ✔
0% - 8%
0.04ms - 8.48ms
branch 516 kB 105.62ms - 112.06ms unsure 🔍
-0% - +8%
+0.04ms - +8.48ms
-

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant