Skip to content

wip: lightbox - #10821

Draft
yihuiliao wants to merge 9 commits into
mainfrom
lightbox
Draft

yihuiliao wants to merge 9 commits into
mainfrom
lightbox

Conversation

@yihuiliao

Copy link
Copy Markdown
Member

Closes

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices
  • I understand every change in this PR and can explain why it's there.
  • If AI-assisted, I followed our AI contribution guidance and pointed my assistant at AGENTS.md.

📝 Test Instructions:

🧢 Your Project:

@rspbot

rspbot commented Oct 21, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Oct 21, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Oct 21, 2026

Copy link
Copy Markdown
## API Changes

@react-spectrum/ai

/@react-spectrum/ai:AttachmentList

 AttachmentList <T> {
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   children?: ReactNode | (T) => ReactNode
   dependencies?: ReadonlyArray<any>
   disabledKeys?: Iterable<Key>
   id?: string
   items?: Iterable<T>
+  onAction?: (Key) => void
   onRemove?: (Set<Key>) => void
   slot?: string | null
   styles?: StyleString
 }

/@react-spectrum/ai:PromptFieldAttachmentList

 PromptFieldAttachmentList {
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   children?: (PromptFieldAttachment) => React.ReactNode
   dependencies?: ReadonlyArray<any>
   disabledKeys?: Iterable<Key>
   id?: string
   items?: Iterable<PromptFieldAttachment>
+  onAction?: (Key) => void
   onRemove?: (Set<Key>) => void
   slot?: string | null
   styles?: StyleString
 }

/@react-spectrum/ai:AttachmentListProps

 AttachmentListProps <T> {
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   children?: ReactNode | (T) => ReactNode
   dependencies?: ReadonlyArray<any>
   disabledKeys?: Iterable<Key>
   id?: string
   items?: Iterable<T>
+  onAction?: (Key) => void
   onRemove?: (Set<Key>) => void
   slot?: string | null
   styles?: StyleString
 }

/@react-spectrum/ai:PromptFieldAttachmentListProps

 PromptFieldAttachmentListProps {
   aria-describedby?: string
   aria-details?: string
   aria-label?: string
   aria-labelledby?: string
   children?: (PromptFieldAttachment) => React.ReactNode
   dependencies?: ReadonlyArray<any>
   disabledKeys?: Iterable<Key>
   id?: string
   items?: Iterable<PromptFieldAttachment>
+  onAction?: (Key) => void
   onRemove?: (Set<Key>) => void
   slot?: string | null
   styles?: StyleString
 }

@rspbot

rspbot commented Oct 21, 2026

Copy link
Copy Markdown

Agent Skills Changes

Modified (9)
Install

React Spectrum S2:

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/4653a298425bb81052c501561899fc08beb59c64/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/4653a298425bb81052c501561899fc08beb59c64/

@nwidynski

nwidynski commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

I see this is largely based on Devons exploration from the Carousel RFC. Just for your consideration, I may point out that Tab-based Carousels have a rather large accessibility challenge, that also remains unresolved here: how to handle focus(within) on slides if they are scrolled/swiped. Since this is for a Lightbox component, we should consider enforcing phrasing content only. There are similarities in principle to the ongoing work for "readonly" StepList.

@yihuiliao

Copy link
Copy Markdown
Member Author

Yeah good point on how to handle focus within the slides if they are scrolled/swiped. I'll bring it up with the team and see what we want to do there.

Otherwise, this is supposed to be a pretty simple version of carousel. I don't think we'll have autoplay (at least in this version) so some of the accessibility concerns that were brought up for that use case won't be addressed here. And I don't think there are plans to support Virtualization for this specific component in the AI package. Perhaps that discussion will change if we bring this pattern into RAC.

I will definitely need to play around with the voice over announcements and see how that works with scrolling. It's not something I've tried yet so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants