joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

Improve the template code of the Finder module

Open zwiastunsw opened this issue 2 years ago • 4 comments

A new <search> element has been added to the HTML specification. see 4.4.15 The search element The Finder module template uses the role=search attribute in the form tag.

<form 
   class="mod-finder js-finder-searchform form-search" 
   action="<?php echo Route::_($route); ?>" 
   method="get" 
   role="search">

The incorrect use of the role=search attribute on the form element was pointed out by Adrian Roselli (see Where to Put Your Search Role

I suggest that the Finder module template should be improved:

  • use the search tag
  • remove the role attribute from the form element
  • if the search tag is not used (because it may not yet have good support in browsers and assistive technologies), place the role=search attribute in an additional container (see examples at Adrian Roselli)

zwiastunsw avatar Aug 01 '23 23:08 zwiastunsw

If you read the specification and posts from others such as scott ohara you will see that they disagree with adrian

brianteeman avatar Aug 02 '23 06:08 brianteeman

use the search tag

There is not a single browser that supports this at this time

brianteeman avatar Aug 02 '23 06:08 brianteeman

This is now supported by all browsers

brianteeman avatar Jan 21 '24 09:01 brianteeman

Can someone make a PR for Joomla6?

rdeutz avatar Apr 27 '24 14:04 rdeutz