Skip to content

Commit

Permalink
Handle hidden search field entries
Browse files Browse the repository at this point in the history
Signed-off-by: Roland Dalmulder <contact@rolandd.com>
  • Loading branch information
roland-d committed Feb 24, 2021
1 parent 4dfbfa8 commit 74f0d35
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/media_source/system/js/searchtools.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,10 @@ Joomla = window.Joomla || {};

// Add all active filters to the table caption for screen-readers
const filteredByCaption = document.getElementById('filteredBy');
const isHidden = Object.prototype.hasOwnProperty.call(element.attributes, 'type') && element.attributes.type.value === 'hidden';

// The caption won't exist if no items match the filters so check for the element first
if (filteredByCaption) {
if (filteredByCaption && !isHidden) {
let captionContent = '';

if (element.tagName.toLowerCase() === 'select') {
Expand Down

0 comments on commit 74f0d35

Please sign in to comment.