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

Assorted questions #31

Closed
crertel opened this issue Jun 13, 2019 · 1 comment
Closed

Assorted questions #31

crertel opened this issue Jun 13, 2019 · 1 comment

Comments

@crertel
Copy link

crertel commented Jun 13, 2019

<std-toast id="sample-toast" theme="info">
    Hello World!
</std-toast>
  • What is the purpose of the theme attribute?
  • What are the valid values of the theme attribute? Are custom themes supported?
  • What markup is allowed inside elements? The docs suggest that toasts contain an image, some text, and maybe some interaction, but does the markup allow for more interesting things? Text styling? ARIA markup?
  • How does accessibility work for toasts, anyways?
import { showToast } from 'std:elements/toast';

const toast = showToast("Hello World!", {
    theme: "info",
    duration: 3000
});
  • What markup is allowed in the first param to showToast? Can we pass a DOM element instead?
  • Is there any provision to prevent malicious scripts from filling a user's screen with obnoxious amounts of toast?
  • What happens to toast created in iframe elements?
@domenic
Copy link
Collaborator

domenic commented Jun 13, 2019

What is the purpose of the theme attribute?
What are the valid values of the theme attribute? Are custom themes supported?

See https://github.com/jackbsteinberg/std-toast#attributes, and #18. An active area of discussion!

What markup is allowed inside elements? The docs suggest that toasts contain an image, some text, and maybe some interaction, but does the markup allow for more interesting things? Text styling? ARIA markup?

See https://github.com/jackbsteinberg/std-toast#contents

How does accessibility work for toasts, anyways?

See #25 for some initial discussion.

What markup is allowed in the first param to showToast? Can we pass a DOM element instead?

See https://github.com/jackbsteinberg/std-toast#showtoastmessage-options, plus #12 (which had a bad name; I just renamed it)

Is there any provision to prevent malicious scripts from filling a user's screen with obnoxious amounts of toast?

Currently there is no intention to prevent an obnoxious amount of toasts, just like there is no part of the platform that prevents an obnoxious amount of divs. Note however that the intention is for it to be an in-page control, so it's not an obtrusive native UI element (#27). Also, if the author doesn't override the default behavior and styles, there should be some stacking or queuing, which can mitigate things a bit (see #19).

What happens to toast created in iframe elements?

Good question. The intention is for them to be constrained inside the iframe (see #27).

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

No branches or pull requests

3 participants