blob: e2e4226b062562cc102c2038d8911cba9a4f6be1 [file] [log] [blame]
<style include="settings-shared">
:host {
display: block;
margin: 0;
padding: 0 var(--cr-section-padding);
word-break: break-all;
}
#more-items-link {
color: var(--cr-link-color);
cursor: pointer;
}
#remaining-list :first-child {
margin-top: -1em;
}
.highlight-suffix {
font-weight: bold;
}
</style>
<div id="title" class="secondary">[[title]]</div>
<ul class="secondary">
<template is="dom-repeat" items="[[initialItems_]]">
<li class="visible-item">
<span>[[item.text]]</span><!--
--><span class="highlight-suffix"
hidden="[[!hasHighlightSuffix_(item)]]"><!--
-->[[item.highlightSuffix]]
</span>
</li>
</template>
<li id="more-items-link" hidden="[[expanded_]]" on-click="expandList_">
[[moreItemsLinkText_]]
</li>
</ul>
<!-- Remaining items are kept in a separate <ul> element so that screen
readers don't get confused when the list is expanded. If new items are
simply added to the first <ul> element, the first new item (which will
replace the "N more" link), will be skipped by the reader. As a
consequence, visual impaired users will only have a chance to inspect
that item if they move up on the list, which can't be considered an
expected action. -->
<ul id="remaining-list" hidden="[[!expanded_]]" class="secondary">
<template is="dom-repeat" items="[[remainingItems_]]">
<li class$="[[remainingItemsClass_(expanded_)]]">
<span>[[item.text]]</span><!--
--><span class="highlight-suffix"
hidden="[[!hasHighlightSuffix_(item)]]"><!--
-->[[item.highlightSuffix]]
</span>
</li>
</template>
</ul>