spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

Update focus return from overlays to modal parents

Open Westbrook opened this issue 3 years ago • 2 comments

Description

  • "hover" content doesn't take focus, it shouldn't move focus when closing
  • returned focus shouldn't go to the "root" of a parent modal but to the "trigger" of the recently closed modal

Related issue(s)

  • fixes #2483

How has this been tested?

  • [ ] Test case 1
    1. Go here
    2. Tab through the modal
    3. See that the focus stays on the expected button

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)

Checklist

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

Westbrook avatar Aug 11 '22 12:08 Westbrook

Tachometer results

Chrome

action-bar permalink

Version Bytes Avg Time vs remote vs branch
npm latest 231 kB 32.57ms - 37.67ms - unsure 🔍
-4% - +11%
-1.51ms - +3.71ms
branch 231 kB 33.46ms - 34.57ms unsure 🔍
-10% - +4%
-3.71ms - +1.51ms
-

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 591 kB 213.50ms - 236.99ms - unsure 🔍
-10% - +7%
-21.78ms - +16.97ms
branch 593 kB 212.24ms - 243.06ms unsure 🔍
-8% - +10%
-16.97ms - +21.78ms
-

dialog permalink

Version Bytes Avg Time vs remote vs branch
npm latest 303 kB 81.90ms - 83.69ms - unsure 🔍
-1% - +2%
-0.72ms - +1.68ms
branch 304 kB 81.52ms - 83.12ms unsure 🔍
-2% - +1%
-1.68ms - +0.72ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 295 kB 246.40ms - 251.31ms - unsure 🔍
-3% - +0%
-6.41ms - +0.90ms
branch 296 kB 248.91ms - 254.31ms unsure 🔍
-0% - +3%
-0.90ms - +6.41ms
-

overlay permalink

Version Bytes Avg Time vs remote vs branch
npm latest 333 kB 77.23ms - 87.50ms - unsure 🔍
-3% - +10%
-2.30ms - +8.10ms
branch 334 kB 78.65ms - 80.28ms unsure 🔍
-10% - +3%
-8.10ms - +2.30ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 438 kB 776.07ms - 792.60ms - unsure 🔍
-2% - +1%
-18.45ms - +4.97ms
branch 439 kB 782.79ms - 799.37ms unsure 🔍
-1% - +2%
-4.97ms - +18.45ms
-

popover permalink

Version Bytes Avg Time vs remote vs branch
npm latest 227 kB 33.75ms - 34.51ms - unsure 🔍
-2% - +1%
-0.70ms - +0.33ms
branch 228 kB 33.97ms - 34.66ms unsure 🔍
-1% - +2%
-0.33ms - +0.70ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 530 kB 1952.13ms - 1955.76ms - unsure 🔍
-0% - +0%
-1.78ms - +3.01ms
branch 532 kB 1951.77ms - 1954.89ms unsure 🔍
-0% - +0%
-3.01ms - +1.78ms
-

tooltip permalink

Version Bytes Avg Time vs remote vs branch
npm latest 234 kB 36.64ms - 37.37ms - unsure 🔍
-2% - +1%
-0.63ms - +0.49ms
branch 234 kB 36.65ms - 37.50ms unsure 🔍
-1% - +2%
-0.49ms - +0.63ms
-
Firefox

action-bar permalink

Version Bytes Avg Time vs remote vs branch
npm latest 231 kB 129.21ms - 141.91ms - unsure 🔍
-5% - +8%
-5.97ms - +11.17ms
branch 231 kB 127.21ms - 138.71ms unsure 🔍
-8% - +4%
-11.17ms - +5.97ms
-

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 591 kB 559.19ms - 575.65ms - unsure 🔍
-4% - +1%
-24.89ms - +8.57ms
branch 593 kB 561.01ms - 590.15ms unsure 🔍
-2% - +4%
-8.57ms - +24.89ms
-

dialog permalink

Version Bytes Avg Time vs remote vs branch
npm latest 303 kB 195.09ms - 203.83ms - unsure 🔍
-7% - +1%
-14.33ms - +1.85ms
branch 304 kB 198.90ms - 212.50ms unsure 🔍
-1% - +7%
-1.85ms - +14.33ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 295 kB 700.11ms - 713.21ms - unsure 🔍
-1% - +2%
-4.58ms - +13.74ms
branch 296 kB 695.68ms - 708.48ms unsure 🔍
-2% - +1%
-13.74ms - +4.58ms
-

overlay permalink

Version Bytes Avg Time vs remote vs branch
npm latest 333 kB 227.53ms - 240.23ms - unsure 🔍
-5% - +1%
-11.72ms - +3.48ms
branch 334 kB 233.83ms - 242.17ms unsure 🔍
-2% - +5%
-3.48ms - +11.72ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 438 kB 1628.15ms - 1648.73ms - unsure 🔍
-1% - +0%
-22.62ms - +7.38ms
branch 439 kB 1635.15ms - 1656.97ms unsure 🔍
-0% - +1%
-7.38ms - +22.62ms
-

popover permalink

Version Bytes Avg Time vs remote vs branch
npm latest 227 kB 116.74ms - 137.78ms - unsure 🔍
-7% - +18%
-8.65ms - +21.17ms
branch 228 kB 110.43ms - 131.57ms unsure 🔍
-16% - +7%
-21.17ms - +8.65ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 530 kB 2109.61ms - 2121.43ms - unsure 🔍
-1% - +0%
-12.24ms - +6.64ms
branch 532 kB 2110.96ms - 2125.68ms unsure 🔍
-0% - +1%
-6.64ms - +12.24ms
-

tooltip permalink

Version Bytes Avg Time vs remote vs branch
npm latest 234 kB 109.05ms - 120.63ms - unsure 🔍
-8% - +5%
-9.90ms - +5.46ms
branch 234 kB 112.02ms - 122.10ms unsure 🔍
-5% - +9%
-5.46ms - +9.90ms
-

github-actions[bot] avatar Aug 11 '22 13:08 github-actions[bot]

@joekukish can you tag in on this and make sure we're moving this in the right direction for you?

Westbrook avatar Aug 16 '22 20:08 Westbrook

@Westbrook I've looked at the story and it works as expected for me! Thanks!

joekukish avatar Aug 17 '22 11:08 joekukish