Skip to content

Conversation

@jzempel
Copy link
Member

@jzempel jzempel commented Sep 11, 2024

Description

Applies inert attribute when the Sheet is closed in order to prevent tab focus through the sheet's interactive elements.

Checklist

  • 👌 design updates will be Garden Designer approved (add the designer as a reviewer)
  • 🌐 demo is up-to-date (npm start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • renders as expected in dark mode
  • 🤘 renders as expected with Bedrock CSS (?bedrock)
  • 💂‍♂️ includes new unit tests. Maintain existing coverage (always >= 96%)
  • ♿ tested for WCAG 2.1 AA accessibility compliance
  • 📝 tested in Chrome, Firefox, Safari, and Edge

@jzempel jzempel requested a review from a team as a code owner September 11, 2024 16:13
return (
<SheetContext.Provider value={sheetContext}>
<StyledSheet
inert={isOpen ? undefined : ''}
Copy link
Contributor

@ze-flo ze-flo Sep 11, 2024

Choose a reason for hiding this comment

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

Adding a mental note that this might break with React@19.x:

facebook/react#17157 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

using an empty string feels wrong anyway lol glad they're fixing it.

Copy link
Member Author

Choose a reason for hiding this comment

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

the unit tests should tell us if the fix breaks Garden's code

@jzempel jzempel merged commit 403b70d into main Sep 11, 2024
8 checks passed
@jzempel jzempel deleted the jzempel/inert-sheet branch September 11, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants