react-spectrum icon indicating copy to clipboard operation
react-spectrum copied to clipboard

focusableElements selectors list doesn't include the new <permission /> element

Open gabrielchl opened this issue 7 months ago โ€ข 3 comments

Provide a general summary of the issue here

the focusableElements selectors list (https://github.com/adobe/react-spectrum/blob/2e9061df69eb17f17b0fb7d64d318c2835aed145/packages/%40react-aria/utils/src/isFocusable.ts) doesn't include the new element (https://github.com/WICG/PEPC/blob/main/explainer.md)

this is a new element introduced in Chrome, which acts as a button, and has role: button in the accessibility tree

๐Ÿค” Expected Behavior?

the permission element should be part of that list so that usages of <FocusScope /> and more would work with the new element

๐Ÿ˜ฏ Current Behavior

it ain't part of the list, so when using <FocusScope /> it skips over the element

๐Ÿ’ Possible Solution

add to list

๐Ÿ”ฆ Context

No response

๐Ÿ–ฅ๏ธ Steps to Reproduce

https://codesandbox.io/p/sandbox/strange-monad-2zyz2p must be on chrome, with the "Page embedded permission control (permission element)" flag enabled in chrome://flags

Version

3.30.0

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

Mac

๐Ÿงข Your Company/Team

No response

๐Ÿ•ท Tracking Issue

No response

gabrielchl avatar May 13 '25 11:05 gabrielchl

note that it appears that .focus() doesn't currently work on the element (https://github.com/WICG/PEPC/issues/50), but when it does, this change will need to be made for it to work with react-aria

gabrielchl avatar May 13 '25 12:05 gabrielchl

Thanks for raising this, also tracking PEPC spec, and would love to see this supported when .focus() is added

cuteshaun avatar May 27 '25 18:05 cuteshaun

update: the upstream issue has been fixed, and released in chrome beta

gabrielchl avatar Jun 05 '25 15:06 gabrielchl