googlearchive / paper-toast

A lightweight feedback about an operation in a small popup at the base of the screen on mobile and at the lower left on desktop.
17 stars 8 forks source link

Add aria-alert #3

Closed ryanflorence closed 10 years ago

ryanflorence commented 10 years ago

http://www.w3.org/TR/wai-aria/states_and_properties#aria-live

Screenreaders have no idea anything is happening w/o this.

dfreedm commented 10 years ago

The status role seems sufficient for this case, as the toasts are meant to be informative popups that do not require user interaction. (ac8cb554c883ce7924e475e61ad4bf8493e6230f)

A user can set alert role if they think the toast is more important, or use paper-dialog (696503669e9891011adf21d64e47ae149265cafd)

ryanflorence commented 10 years ago

They seem more like alerts to me. Status is intended to convey the status of something and this component is more like a rails flash message or growl notification, but happy to see this added either way.

Note that the alert role does not receive focus and should not require user interaction to close (unlike alertdialog) if that was your concern.

Sent from my iPhone

On Jul 8, 2014, at 5:37 PM, Daniel Freedman notifications@github.com wrote:

The status role seems sufficient for this case, as the toasts are meant to be informative popups that do not require user interaction. (ac8cb55)

A user can set alert role if they think the toast is more important, or use paper-dialog (6965036)

— Reply to this email directly or view it on GitHub.

alice commented 10 years ago

We had a play with both alert and status roles, and decided that status was a better fit as it defaults to an aria-live value of polite, which seemed to suit these informational pop-ups better. When we used alert we found the assertive nature was a poor fit, since in most cases it was simply confirming an action had taken place, but it would interrupt the speech for the button click action which caused the toast to appear. 6965036 demonstrates adding an alert role (which overrides the default status role) for a toast which is more urgent.