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

fix(overlay): allow "receives-focus" to target the root of an overlay #3658

Merged
merged 3 commits into from
Sep 18, 2023

Conversation

Westbrook
Copy link
Contributor

Description

Adds ability for the Overlay to pass focus focus to a root element in the Overlay rather than only child content.

Related issue(s)

How has this been tested?

  • Test case 1
    1. Go here
    2. See that focus is on the link by default when the overlay is first opened

Types of changes

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

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

interaction,
open,
placement,
receivesFocus,
Copy link
Contributor

@Rajdeepc Rajdeepc Sep 18, 2023

Choose a reason for hiding this comment

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

can we write something like receivesFocus='auto' as a default value if it doesn't receive any value instead of adding a || in the .receivesFocus attr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated!

@Westbrook Westbrook merged commit 0db1025 into main Sep 18, 2023
7 checks passed
@Westbrook Westbrook deleted the receives-focus branch September 18, 2023 16:32
@github-actions
Copy link

github-actions bot commented Sep 18, 2023

Tachometer results

Chrome

action-bar permalink

Version Bytes Avg Time vs remote vs branch
npm latest 476 kB 194.86ms - 198.42ms - unsure 🔍
-2% - +0%
-4.86ms - +0.38ms
branch 471 kB 196.96ms - 200.80ms unsure 🔍
-0% - +2%
-0.38ms - +4.86ms
-

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 624 kB 385.88ms - 392.78ms - faster ✔
1% - 3%
2.50ms - 11.85ms
branch 624 kB 393.35ms - 399.66ms slower ❌
1% - 3%
2.50ms - 11.85ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 450 kB 558.12ms - 568.04ms - unsure 🔍
-1% - +1%
-7.87ms - +4.87ms
branch 446 kB 560.58ms - 568.57ms unsure 🔍
-1% - +1%
-4.87ms - +7.87ms
-

overlay permalink

Version Bytes Avg Time vs remote vs branch
npm latest 479 kB 155.89ms - 158.95ms - unsure 🔍
-2% - +1%
-2.53ms - +1.69ms
branch 490 kB 156.39ms - 159.29ms unsure 🔍
-1% - +2%
-1.69ms - +2.53ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 490 kB 1402.23ms - 1423.58ms - unsure 🔍
-2% - +1%
-22.98ms - +16.87ms
branch 490 kB 1399.14ms - 1432.78ms unsure 🔍
-1% - +2%
-16.87ms - +22.98ms
-

popover permalink

Version Bytes Avg Time vs remote vs branch
npm latest 372 kB 55.73ms - 57.57ms - unsure 🔍
-3% - +2%
-1.95ms - +0.90ms
branch 368 kB 56.08ms - 58.27ms unsure 🔍
-2% - +3%
-0.90ms - +1.95ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 694 kB 1919.71ms - 1937.99ms - unsure 🔍
-0% - +1%
-4.83ms - +14.10ms
branch 694 kB 1921.75ms - 1926.69ms unsure 🔍
-1% - +0%
-14.10ms - +4.83ms
-

tooltip permalink

Version Bytes Avg Time vs remote vs branch
npm latest 576 kB 140.92ms - 144.66ms - slower ❌
2% - 5%
2.40ms - 6.93ms
branch 553 kB 136.85ms - 139.41ms faster ✔
2% - 5%
2.40ms - 6.93ms
-
Firefox

action-bar permalink

Version Bytes Avg Time vs remote vs branch
npm latest 476 kB 340.54ms - 357.46ms - unsure 🔍
-8% - +1%
-29.24ms - +2.56ms
branch 471 kB 348.87ms - 375.81ms unsure 🔍
-1% - +8%
-2.56ms - +29.24ms
-

action-menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 624 kB 480.51ms - 509.33ms - unsure 🔍
-5% - +3%
-24.68ms - +13.28ms
branch 624 kB 488.27ms - 512.97ms unsure 🔍
-3% - +5%
-13.28ms - +24.68ms
-

menu permalink

Version Bytes Avg Time vs remote vs branch
npm latest 450 kB 716.09ms - 761.71ms - unsure 🔍
-5% - +2%
-41.35ms - +17.59ms
branch 446 kB 732.12ms - 769.44ms unsure 🔍
-2% - +6%
-17.59ms - +41.35ms
-

overlay permalink

Version Bytes Avg Time vs remote vs branch
npm latest 476 kB 244.01ms - 266.71ms - unsure 🔍
-6% - +6%
-16.63ms - +15.39ms
branch 472 kB 244.69ms - 267.27ms unsure 🔍
-6% - +7%
-15.39ms - +16.63ms
-

picker permalink

Version Bytes Avg Time vs remote vs branch
npm latest 490 kB 1290.39ms - 1343.41ms - unsure 🔍
-4% - +2%
-47.47ms - +27.51ms
branch 490 kB 1300.37ms - 1353.39ms unsure 🔍
-2% - +4%
-27.51ms - +47.47ms
-

popover permalink

Version Bytes Avg Time vs remote vs branch
npm latest 372 kB 123.63ms - 141.97ms - unsure 🔍
-9% - +9%
-12.44ms - +12.28ms
branch 368 kB 124.59ms - 141.17ms unsure 🔍
-9% - +9%
-12.28ms - +12.44ms
-

split-button permalink

Version Bytes Avg Time vs remote vs branch
npm latest 694 kB 1629.81ms - 1647.55ms - unsure 🔍
-0% - +1%
-4.21ms - +16.97ms
branch 694 kB 1626.52ms - 1638.08ms unsure 🔍
-1% - +0%
-16.97ms - +4.21ms
-

tooltip permalink

Version Bytes Avg Time vs remote vs branch
npm latest 553 kB 211.26ms - 230.30ms - unsure 🔍
-8% - +5%
-17.07ms - +12.23ms
branch 537 kB 212.06ms - 234.34ms unsure 🔍
-6% - +8%
-12.23ms - +17.07ms
-

TarunAdobe pushed a commit that referenced this pull request Sep 20, 2023
…#3658)

* fix(overlay): allow "receives-focus" to target the root of an overlay

* ci: update golden images cache

* docs(overlay): massage types
TarunAdobe pushed a commit that referenced this pull request Sep 21, 2023
…#3658)

* fix(overlay): allow "receives-focus" to target the root of an overlay

* ci: update golden images cache

* docs(overlay): massage types
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.

[Bug]: Overlay receives-focus="true" cannot throw focus to a direct descendent
4 participants