adobe / adobe/react-spectrum

useFocusVisible returns false when using Full Keyboard Access on Apple devices

Open
#8,238 1 comment 0 reactions 0 assignees View on GitHub
needs investigation
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### Provide a general summary of the issue here

When using Apple's Full Keyboard Access accessibility feature, `useFocusVisible` hook wrongly returns `false` after pressing space (default `Activate` key). This seems to be inconsistent with HTML's `:focus-visible`, which keeps taking effect (tested on Chrome 135.0.7049.115 and MacOS 15.3.1).

### 🤔 Expected Behavior?

`useFocusVisible` should stay `true` after pressing space in Full Keyboard Access mode

### 😯 Current Behavior

`useFocusVisible` is changed to `false` after pressing space in Full Keyboard Access mode

### 💁 Possible Solution

_No response_

### 🔦 Context

_No response_

### 🖥️ Steps to Reproduce

The issue is visible on the documentation page for `useFocusVisible`.

1. Turn on Full Keyboard Access accessibility setting
2. Go to https://react-spectrum.adobe.com/react-aria/useFocusVisible.html
3. Navigate around the page using Tab key. The `Focus visible` indicator in [example](https://react-spectrum.adobe.com/react-aria/useFocusVisible.html#example) is set to true
4. Press space to perform an action (e.g. open one of the drop-down menus)
5. The `Focus visible` indicator now displays `false`

### Version

3.39.0

### What browsers are you seeing the problem on?

Chrome

### If other, please specify.

Safari, Firefox

### What operating system are you using?

MacOS 15.3.1

### 🧢 Your Company/Team

_No response_

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the useFocusVisible hook and reproduce the behavior on the documentation page's example using Full Keyboard Access on macOS. Compare the hook's state after Tab navigation and pressing Space across Chrome, Safari, and Firefox. Done means the Focus visible indicator remains true after Space activates an action, matching :focus-visible behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.