You are here

accessibility

Where to put the search role when your search form is hidden

I've worked on several sites recently where the site search form is hidden by default and displayed by activating a button. This pattern caused me a bit of confusion about where to put the role="search" attribute, which is important for accessibility.

According to the W3C specification the search role is:

A landmark region that contains a collection of items and objects that, as a whole, combine to create a search facility.

Browsing the web as a developer

I've been maintaining or building websites since September of 1999. At the time of this writing, that's almost 20 years.

One of my main focuses as a web developer is usability/accessibility—making the sites I build intuitive, easy to understand and operate, and accessible to all users, including those with disabilities, as much as possible.