Skip to content

Conversation

@smhigley
Copy link
Contributor

Previous Behavior

When autoplay is enabled, it fires a live region message on every automatic slide change, which ends up being pretty disruptive when trying to browse the page with a screen reader.

New Behavior

Live region announcements fire for all non-automatic slide changes, but not for autoplay.

Related Issue(s)

(Found this when working on a different carousel bug that ended up being unrelated)

@smhigley smhigley marked this pull request as ready for review February 12, 2025 21:57
@smhigley smhigley requested review from a team and Mitch-At-Work as code owners February 12, 2025 21:57
const { announce } = useAnnounce();

const updateAnnouncement = useEventCallback(() => {
const updateAnnouncement = useEventCallback((newIndex: number) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated this to take an index directly, since activeIndex isn't updated to the new value when updateAnnouncement is called

@smhigley smhigley requested a review from a team as a code owner February 12, 2025 21:59
@smhigley smhigley force-pushed the carousel-auto-announce branch from 0b069d6 to f956851 Compare February 12, 2025 22:00
@smhigley smhigley removed the request for review from a team February 12, 2025 22:00
@github-actions
Copy link

Pull request demo site: URL

@github-actions
Copy link

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.171 MB
293.127 kB
1.171 MB
293.128 kB
34 B
1 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-components
react-components: Button, FluentProvider & webLightTheme
69.638 kB
20.24 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
224.582 kB
64.913 kB
react-components
react-components: FluentProvider & webLightTheme
44.473 kB
14.597 kB
react-portal-compat
PortalCompatProvider
8.39 kB
2.64 kB
react-timepicker-compat
TimePicker
108.551 kB
36.094 kB
🤖 This report was generated against e242da38cf12096f5aaf2da647a2bdd4da431577

@fabricteam
Copy link
Collaborator

🕵 fluentuiv9 No visual regressions between this PR and main

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.

2 participants