WadimS,
<!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
li.red {
background-color: hsla(0, 100%, 50%, 1);
}
</style>
</head>
<body>
<ul>
<li></li>
<li data-defected='Некондиционная поставка, брак. Списание в затраты.'></li>
<li data-defected='test'></li>
<li data-defected='ИНСТРУМЕНТЫ'></li>
</ul>
<script>
const filterList = (list, value) => {
let newList = [],
words = value.split(/\s+/).map(str => str.toLowerCase());
for (let li of list) {
let defected = li.dataset.defected;
if (defected) {
defected = defected.toLowerCase();
let include = words.some(str => defected.includes(str));
if (include) newList.push(li)
}
}
return newList;
}
let list = document.querySelectorAll('li'),
value = 'брак техотсев инструмент';
list = filterList(list, value);
list.forEach(elem => elem.classList.add('red'));
</script>
</body>
</html>