Update the API and content model for supplying actions#43
Conversation
That doesn't work so well in a world with custom elements.
| - All children except an action need to be [phrasing content](https://html.spec.whatwg.org/#phrasing-content-2) | ||
| that is not [interactive content](https://html.spec.whatwg.org/#interactive-content-2). | ||
| These children provide the toast's message. | ||
| - There may be zero or one actions, |
There was a problem hiding this comment.
Do we have any accessibility links or arguments that we can add near this section to back up the zero / one choice?
There was a problem hiding this comment.
I don't think we have any accessibility arguments for this at this point in time. Although you can imagine some (e.g. if there were a keyboard shortcut), for now I think it's more just about simplicity and "what is a toast"
| <std-toast> | ||
| <p>Hello world!</p> | ||
| <button>Click me!</button> | ||
| <std-toast id="toast3"> |
There was a problem hiding this comment.
I'm also a bit confused, are these meant to be the result of the JS below, or just a parallel way of doing it? If the first thing, maybe just add comments above each of the HTML representations matching them to the # of toast in the js, this one has an ID but the others don't. Otherwise it might make sense to move the snippet query selecting this element up next to it.
There was a problem hiding this comment.
It's meant to be parallel, per the "These can equivalently be created via JavaScript:". I'll move the snippet up next to this; let me know if you have other thoughts on how to make it clearer.
| that don't fit the above content model, | ||
| would require more custom handling on the part of the developer: | ||
| would require custom handling on the part of the developer, | ||
| as they are stepping outside of the supported use case: |
There was a problem hiding this comment.
Do we have accessibility backup for why those are the supported ones, or is it just that we want to reduce complexity?
There was a problem hiding this comment.
I'm not sure if this is an accessibility thing, as much as a "what is a toast" thing.
Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391
Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391
Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org> Reviewed-by: Fergal Daly <fergal@chromium.org> Cr-Commit-Position: refs/heads/master@{#676482}
Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org> Reviewed-by: Fergal Daly <fergal@chromium.org> Cr-Commit-Position: refs/heads/master@{#676482}
Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org> Reviewed-by: Fergal Daly <fergal@chromium.org> Cr-Commit-Position: refs/heads/master@{#676482}
Automatic update from web-platform-tests Create toast action setter Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org> Reviewed-by: Fergal Daly <fergal@chromium.org> Cr-Commit-Position: refs/heads/master@{#676482} -- wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748 wpt-pr: 17780
Automatic update from web-platform-tests Create toast action setter Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org> Reviewed-by: Fergal Daly <fergal@chromium.org> Cr-Commit-Position: refs/heads/master@{#676482} -- wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748 wpt-pr: 17780
Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR web-platform-tests#43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org> Reviewed-by: Fergal Daly <fergal@chromium.org> Cr-Commit-Position: refs/heads/master@{#676482}
Automatic update from web-platform-tests Create toast action setter Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinbergchromium.org> Reviewed-by: Fergal Daly <fergalchromium.org> Cr-Commit-Position: refs/heads/master{#676482} -- wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748 wpt-pr: 17780 UltraBlame original commit: e1fec2bf3959430641d7cbd6cc628ba92faaad40
Automatic update from web-platform-tests Create toast action setter Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinbergchromium.org> Reviewed-by: Fergal Daly <fergalchromium.org> Cr-Commit-Position: refs/heads/master{#676482} -- wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748 wpt-pr: 17780 UltraBlame original commit: e1fec2bf3959430641d7cbd6cc628ba92faaad40
Automatic update from web-platform-tests Create toast action setter Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinbergchromium.org> Reviewed-by: Fergal Daly <fergalchromium.org> Cr-Commit-Position: refs/heads/master{#676482} -- wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748 wpt-pr: 17780 UltraBlame original commit: e1fec2bf3959430641d7cbd6cc628ba92faaad40
Automatic update from web-platform-tests Create toast action setter Additionally, this CL adds support for passing Elements as action in showToast, using the action setter. This change is the latest in a series of changes implementing new behavior added to the toast explainer in PR #43 jackbsteinberg/std-toast#43. Bug: 972945 Change-Id: I46004883cb3b794981029aa02369918dd0077391 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1686786 Commit-Queue: Jack Steinberg <jacksteinberg@chromium.org> Reviewed-by: Fergal Daly <fergal@chromium.org> Cr-Commit-Position: refs/heads/master@{#676482} -- wpt-commits: 11051ca7a0270ae8fe07939d35cd923e5b542748 wpt-pr: 17780
Closes #11 by providing an initial design for the action option, getter, and setter
Closes #12 by deciding only to accept text; use the innerHTML setter to set HTML.
Closes #21 by settling on a specific content model and chosing the slot="action" attribute pattern.