Skip to content

Dismissable toasts#6345

Merged
gaearon merged 6 commits into
mainfrom
samuel/dismissable-toasts
Nov 22, 2024
Merged

Dismissable toasts#6345
gaearon merged 6 commits into
mainfrom
samuel/dismissable-toasts

Conversation

@mozzius
Copy link
Copy Markdown
Member

@mozzius mozzius commented Nov 14, 2024

Swipe to dismiss toasts. Also means you can keep it alive to read if you tap and hold

  • a11y improvements!
Simulator.Screen.Recording.-.iPhone.16.-.2024-11-14.at.18.44.48.mp4

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 14, 2024

Old size New size Diff
8.06 MB 8.06 MB 198 B (0.00%)

@SleeplessByte
Copy link
Copy Markdown

SleeplessByte commented Nov 15, 2024

Related: #6322.

If you don't want to do the work to make these accessible now, you could add a fallback accessibility action so that people who cannot swipe, can still dismiss the toast sooner than the timeout. This does not make the toast accessible, but makes it a tiny bit less bad for a particular subset of users. The TL;DR of the linked page is that swiping is not something that people universally can do, adding an accessibilityAction allows you to expose the dismiss via assistive technology as an alternative to the swipe.

@mozzius
Copy link
Copy Markdown
Member Author

mozzius commented Nov 15, 2024

Related: #6322.

If you don't want to do the work to make these accessible now, you could add a fallback accessibility action so that people who cannot swipe, can still dismiss the toast sooner than the timeout. This does not make the toast accessible, but makes it a tiny bit less bad for a particular subset of users. The TL;DR of the linked page is that swiping is not something that people universally can do, adding an accessibilityAction allows you to expose the dismiss via assistive technology as an alternative to the swipe.

good shout! pushed some a11y improvements too

@gaearon gaearon force-pushed the samuel/dismissable-toasts branch from aae4e4c to 63a1f47 Compare November 22, 2024 15:24
@arcalinea arcalinea temporarily deployed to samuel/dismissable-toasts - social-app PR #6345 November 22, 2024 15:24 — with Render Destroyed
@arcalinea arcalinea temporarily deployed to samuel/dismissable-toasts - social-app PR #6345 November 22, 2024 16:03 — with Render Destroyed
Copy link
Copy Markdown
Contributor

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

seems legit

@gaearon gaearon merged commit 76ca72c into main Nov 22, 2024
@mozzius mozzius deleted the samuel/dismissable-toasts branch June 10, 2025 21:11
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.

4 participants