Skip to content

Commit c4ddfb8

Browse files
authored
Handle hidden search field entries (#32511)
Signed-off-by: Roland Dalmulder <[email protected]>
1 parent fdba1b1 commit c4ddfb8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/media_source/system/js/searchtools.es6.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,10 @@ Joomla = window.Joomla || {};
322322

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

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

330331
if (element.tagName.toLowerCase() === 'select') {

0 commit comments

Comments
 (0)