Hello all,
We are thinking about moving to directives that use replace=false, as I
hear replace=true is being deprecated. One problem I cant figure out how to
fix is for all directives that are based on lists, the resultant html is
not semantic.
For example a list directive might be something like:
<tg-list tg-compact="true">
<tg-list-item>foo</tg-list-item>
<tg-list-item>bar</tg-list-item>
</tg-list>
this will currently (with replace=true) compile to:
<ul class="o-list o-list--compact">
<li class="o-list-item">
foo
</li>
<li class="o-list-item">
bar
</li>
</ul>
with replace=false we will end up with either:
<tg-list class="o-list-icon o-list-icon--compact">
<ul>
<tg-list-item>
<li class="o-list-item">foo</li>
</tg-list-item>
<tg-list-item>
<li class="o-list-item">bar</li>
</tg-list-item>
</ul>
</tg-list>
or:
<tg-list class="o-list-icon o-list-icon--compact">
<tg-list-item>foo</tg-list-item>
<tg-list-item>bar</tg-list-item>
</tg-list>
the first is bad because it is definitely non semantic, the second is bad
because although it is "semantic" (as in html5, custom tags are ok), we
lose anything that ul>li would have given us (a screen reader for example
may have special ways to treats them).
Perhaps we can use html5 role attributes? But if so i think the list item
would need add the role to the element in the link function?
The ideal solution would be the compiled html that uses ul/li semantically,
otherwise an indication of how to get roles working if that will do the job
Dunno, but how have you lot solved this?
Cheers!
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.