From 674921f283ecc29123fe0b786343c96593752b13 Mon Sep 17 00:00:00 2001 From: Miguel Camba Date: Sun, 14 Oct 2018 13:52:32 +0200 Subject: [PATCH 1/4] Dynamic tags in glimmer templates --- text/0000-dynamic-tag-names.md | 111 +++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 text/0000-dynamic-tag-names.md diff --git a/text/0000-dynamic-tag-names.md b/text/0000-dynamic-tag-names.md new file mode 100644 index 0000000000..bb3e587846 --- /dev/null +++ b/text/0000-dynamic-tag-names.md @@ -0,0 +1,111 @@ +- Start Date: 2018-10-14 +- RFC PR: (leave this empty) +- Ember Issue: (leave this empty) + +# Dynamic tag names in glimmer templates. + +## Summary + +With the transition from inner-html semantics to outer-html semantics in components, we lost one feature: Being +able dynamically define the tag name of components. + +I think it was an useful feature and we should find a way to bring it back. + +## Motivation + +Although not something we use every day, there is a need for some components to have a dynamic tag name. + +This is most often used for certain low-level _presentational_ components. + +Take for instance a component named `` that is used to encapsulate some presentation concerns. +The template of that component could be like this: + +```hbs +
+ {{yield}} +
+``` + +For accessibility and semantic reasons, sometimes a `
` may not be the best kind of tag. +We might want the panel to be a `
` element, or an `