Skip to content
Advertisement

Inform the number of items filtered via list.js

I start by saying that I am not a developer, but I understand the minimum of JS … However I am not managing to solve something that in my view seems very simple (I think it is).

Using List.js I was able to configure the filters to filter specific items in the guide-wcag.com/en/ I was able to configure the error message when nothing is found, I was able to configure some keywords and the checkboxes too …

But I would also like to include the quantity of filtered items (a message should appear, indicating the quantity, as this helps those who are not seeing the content and use a screen reader, for example), but I couldn’t do it at all. . 🙁

The message with the number of items should appear in the same place where the message appears when nothing is found.

I will leave here the excerpts of JS that I used (I repeat, I am not a JS expert, sorry for any wrong syntax).

thanks

JavaScript

Advertisement

Answer

Using the basic examples, I started with the last example and modified your message element.

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement