adobe / adobe/react-spectrum

Inconsistent Focus Behavior with Lists

Open
#7,482 2 comments 0 reactions 0 assignees View on GitHub
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

The issue can be demonstrated in the Storybook - ListView - default.

- Click into "focus before" and tab into the ListView. The first item is focused. Now tab into "focus after" and shift-tab back. Again, the first item is focused.
- Now make sure the last active item ("Adobe Illustrator") is focused in the List, and do the above steps again. When you shift-tab back, the checkbox is focused, not the item.

### 🤔 Expected Behavior?

The item should be focused in the second scenario, not the checkbox.

### 😯 Current Behavior

[Storybook link](http://localhost:9003/?path=/story/listview--default&providerSwitcher-express=false&strict=true)

### 💁 Possible Solution

_No response_

### 🔦 Context

_No response_

### 🖥️ Steps to Reproduce

See summary. Also happens [in the docs](https://react-spectrum.adobe.com/react-aria/GridList.html#example)

### Version

main branch

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

Firefox, Chrome, Microsoft Edge

### If other, please specify.

_No response_

### What operating system are you using?

windows

### 🧢 Your Company/Team

_No response_

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.