Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(live-region): update live region helpers to match ADR #4673

Merged
merged 11 commits into from
Jun 28, 2024

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Jun 14, 2024

Update our live region helpers to match the feedback and decisions from the ADR: #4611

Changelog

New

  • Add support for hidden to Announce, AriaStatus, and AriaAlert so that messages are not announced when the container is hidden
  • Add support for delayMs to Announce, AriaStatus, and AriaAlert to specify the delay before making an announcement
  • Add Announce, AriaStatus, and AriaAlert as experimental components

Changed

Removed

Rollout strategy

  • Minor release

Copy link

changeset-bot bot commented Jun 14, 2024

🦋 Changeset detected

Latest commit: 813845c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jun 14, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.88 KB (0%)
packages/react/dist/browser.umd.js 91.07 KB (0%)

@joshblack joshblack marked this pull request as ready for review June 19, 2024 20:39
@joshblack joshblack requested a review from a team as a code owner June 19, 2024 20:39
Copy link
Contributor

@khiga8 khiga8 left a comment

Choose a reason for hiding this comment

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

This looks great! ❤️ Thank you for all your work on this! I think aligning the defaults with default behavior of ARIA is safe to start with, and we could revisit defaults if we need to.

Do you ideas around how we might validate that people are using the API as intended?

@joshblack
Copy link
Member Author

Do you ideas around how we might validate that people are using the API as intended?

@khiga8 love this question, thanks for asking. I definitely want to have a chart over in the Primer Query dashboard not only for adoption but to see what props are being used. My hope is that based on this (and usage within PRC) we get a better idea of what is needed, whether that's lint rules, getting rid of props, or something to help with common gotchas.

@TylerJDev TylerJDev self-requested a review June 26, 2024 18:24
Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

Scanned the code and checked out the story changes. Looks pretty good 👍🏻

@@ -604,7 +604,8 @@ const SelectPanelSecondaryAction: React.FC<SelectPanelSecondaryActionProps> = ({

const SelectPanelLoading = ({children = 'Fetching items...'}: React.PropsWithChildren) => {
return (
<Status
<AriaStatus
announceOnShow
Copy link
Member

Choose a reason for hiding this comment

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

Stupid question, are there styles attached to <Status> and is that different than <AriaStatus>

Copy link
Member Author

Choose a reason for hiding this comment

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

@jonrohan no styles, just behavior for now 👀 They're both setup as a Box though internally 😅

@joshblack joshblack added this pull request to the merge queue Jun 28, 2024
Merged via the queue into main with commit eedc6b1 Jun 28, 2024
30 checks passed
@joshblack joshblack deleted the feat/update-live-region-components branch June 28, 2024 17:04
@primer primer bot mentioned this pull request Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants