<$list filter="[all[tiddlers+shadows]tag[$:/tags/Layout]] [[$:/core/ui/PageTemplate]] +[!is[draft]sort[name]]">
-<$list
- filter="[{$:/layout}!has[text]]"
- variable="ignore"
- emptyMessage="""\whitespace trim
- <$set name="cls" filter="[all[current]field:title{$:/layout}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
-
>>
- <$link to={{!!title}}>
- ''<$transclude tiddler={{{ [get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
- $link>
$set>
-""">
-<$set name="cls" filter="[all[current]field:title[$:/core/ui/PageTemplate]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
-
>>
-<$link to={{!!title}}>
-''<$transclude tiddler={{{ [get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
-$link>
-
-$set>
-$list>
+ <$list filter="[{$:/layout}!has[text]]" variable="ignore">
+ <$list-empty>
+
+ <$link to={{!!title}} role="option" aria-selected={{{ [layout.empty.filter[]then[true]else[false]] }}}>
+ ''<$transclude tiddler={{{ [get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
+ $link>
+
+ $list-empty>
+
+ <$link to={{!!title}} role="option" aria-selected={{{ [layout.filter[]then[true]else[false]] }}}>
+ ''<$transclude tiddler={{{ [get[icon]] }}}/><$transclude field="name"/>'' - <$transclude field="description"/>
+ $link>
+
+ $list>
$list>
$linkcatcher>
diff --git a/core/wiki/languageswitcher.tid b/core/wiki/languageswitcher.tid
index 7d79c0f5c4..a3c5ca97f2 100644
--- a/core/wiki/languageswitcher.tid
+++ b/core/wiki/languageswitcher.tid
@@ -1,20 +1,20 @@
title: $:/snippets/languageswitcher
\whitespace trim
+\function language.filter() [all[current]field:title{$:/language}]
+
<$linkcatcher to="$:/language">
-
+
<$list filter="[[$:/languages/en-GB]] [plugin-type[language]sort[description]]">
-<$set name="cls" filter="[all[current]field:title{$:/language}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
-
> lang={{!!name}}>
-<$link>
-<$view field="description">
-<$view field="name">
-<$view field="title"/>
-$view>
-$view>
-$link>
-
-$set>
+
+ <$link role="option" aria-selected={{{ [language.filter[]then[true]else[false]] }}}>
+ <$view field="description">
+ <$view field="name">
+ <$view field="title"/>
+ $view>
+ $view>
+ $link>
+
$list>
$linkcatcher>
\ No newline at end of file
diff --git a/core/wiki/themeswitcher.tid b/core/wiki/themeswitcher.tid
index 6259af063f..79f4a09ba6 100644
--- a/core/wiki/themeswitcher.tid
+++ b/core/wiki/themeswitcher.tid
@@ -1,17 +1,18 @@
title: $:/snippets/themeswitcher
\whitespace trim
+\function theme.filter() [all[current]field:title{$:/theme}] [[$:/theme]!has[text]addsuffix[s/tiddlywiki/vanilla]field:title
] +[limit[1]]
+
<$linkcatcher to="$:/theme">
-
+
<$list filter="[plugin-type[theme]sort[title]]">
-<$set name="cls" filter="[all[current]field:title{$:/theme}] [[$:/theme]!has[text]addsuffix[s/tiddlywiki/vanilla]field:title
] +[limit[1]]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">
->><$link to={{!!title}}>
-''<$view field="name" format="text"/>''
-
-<$view field="description" format="text"/>
-$link>
-
-$set>
+
+ <$link to={{!!title}} role="option" aria-selected={{{ [theme.filter[]then[true]else[false]] }}}>
+ ''<$view field="name" format="text"/>''
+
+ <$view field="description" format="text"/>
+ $link>
+
$list>
$linkcatcher>
\ No newline at end of file
diff --git a/core/wiki/viewswitcher.tid b/core/wiki/viewswitcher.tid
index b82fcb2642..1ff289cdfe 100644
--- a/core/wiki/viewswitcher.tid
+++ b/core/wiki/viewswitcher.tid
@@ -4,13 +4,14 @@ title: $:/snippets/viewswitcher
$:/core/images/storyview-$(storyview)$
\end
\whitespace trim
+\function view.filter() [
prefix{$:/view}]
+
<$linkcatcher to="$:/view">
-
+
<$list filter="[storyviews[]]" variable="storyview">
-<$set name="cls" filter="[
prefix{$:/view}]" value="tc-chooser-item tc-chosen" emptyValue="tc-chooser-item">>>
-<$button tag="a" class="tc-tiddlylink tc-btn-invisible" to=<
>><$transclude tiddler=<>/><$text text=<>/>$button>
+
+<$button tag="a" class="tc-tiddlylink tc-btn-invisible" role="option" to=<> aria-selected={{{ [view.filter[]then[true]else[false]] }}}><$transclude tiddler=<>/><$text text=<>/>$button>
-$set>
$list>
$linkcatcher>