Definition
A situation that arises from difficulty clearing previous search queries in the search box (text with tooltip) A design element that allows users to enter search terms into a blank field. efficiently and effectively due to inaccessible or unavailable features or instructions.
Factors Leading to the Situation
- Inappropriate labeling: unlabeled active elements (text with tooltip) An interactive HTML component that reacts to user actions such as input, textarea, button, and 'a' tags. or features
- Lack of features/functions/items/information: unavailable active elements or features
Guidelines
- Ensure that the process of clearing a search query from the search box (text with tooltip) A design element that allows users to enter search terms into a blank field. is efficient and effective.
Rationale for Suggesting the above Guidelines
The suggested guideline provides simple and accessible solutions for BVI (text with tooltip) The acronym for Blind and Visually Impaired. It refers to BVI users who rely on screen readers to interact with digital libraries (DLs). users. By incorporating “Clear search query” feature and voice commands (text with tooltip) A feature that uses spoken instructions and hands-free interaction to control digital devices and improve accessibility. , BVI users can easily clear previous search queries and initiate new searches without assistance. This guideline promotes inclusive design, satisfying the specific needs of BVI users of DLs (text with tooltip) The acronym for digital library (DL) .
Techniques and Methods to Comply with a Specific Design Guideline
1.1. Offer a button or icon to clear previous search query.
1.2. Use
ARIA
(text with tooltip)
The acronym for Accessible Rich Internet Applications. It is a set of attributes that define ways to make web content and user interface more accessible to people with disabilities.
code to make clearing button/icon accessible.
1.3. Incorporate
voice commands
(text with tooltip)
A feature that uses spoken instructions and hands-free interaction to control digital devices and improve accessibility.
to clear the
search box
(text with tooltip)
A design element that allows users to enter search terms into a blank field.
.
Features Suggested for Users
1.1.1/1.2.1. “Clear search query” (See example 1.1.1.a. and 1.2.1.a.)
1.3.1.
Voice commands
(text with tooltip)
A feature that uses spoken instructions and hands-free interaction to control digital devices and improve accessibility.
(See example 1.3.1.a.)
Examples of Best Practice
1.1.1.a. An accessible “Clear search query” feature
To clear a search query in a
search box
(text with tooltip)
A design element that allows users to enter search terms into a blank field.
, it is easier and more intuitive to click an explicit “Clear search query” feature than to highlight the query and delete it (EXE1 Figure a1).
EXE1 Figure a1. An example of clear search button with adequate label
1.2.1.a1. Providing ARIA code
EXE1 Figure a2 demonstrates the use of aria-label (text with tooltip) An HTML attribute that provides a text label for an object, such as a button. to associate the clear search feature with an element containing a message like “Clear search box.” This ensures that screen reader users receive the relevant information about the feature.
View and Copy code
<form role="search" id="searchForm">
<div style="position: relative;">
<input type="search" id="search" name="q" aria-label="Search query" oninput="toggleClearButton()">
<span class="clear-button" aria-label="Clear search" onclick="clearSearch()"></span>
</div>
<button type="submit" aria-label="Submit search">Search</button>
</form>
<script>
// Function to toggle the visibility of the clear button
function toggleClearButton() {
const searchInput = document.getElementById('search');
const clearButton = document.querySelector('.clear-button');
clearButton.style.visibility = searchInput.value.length > 0 ? 'visible' : 'hidden';
}
// Function to clear the search input
function clearSearch() {
const searchInput = document.getElementById('search');
searchInput.value = ''; // Clears the input field
toggleClearButton(); // Hide the clear button after clearing
}
</script>
EXE1 Figure a2. An example code for aria-label related to clear search
1.3.1.a. Voice commands
Using mobile
voice commands
(text with tooltip)
A feature that uses spoken instructions and hands-free interaction to control digital devices and improve accessibility.
, users can delete search queries in the search box. In EXE1 Figure a3, Android users can use Google Gboard commands like “Delete last word” or “Clear all.” iOS users can employ Voice Control commands such as “Delete all” or “Delete paragraph.” EXE1 Figure a3. List of voice command associated with text deletion
Examples of Poor Practice
1.1.1.b1. Difficulty clearing a search box
As shown in EXE1 b1, the participant had difficulty efficiently clearing the search query because there was not a button available to directly clear search terms present in the search box. “[enters search box] Trying to clear the search. There doesn’t seem to be a clear search button.” (S12-B-M. App)

EXE1 Figure b1. Screenshot of difficulty clearing a search box
1.1.1.b2. Difficulty clearing a search box
According to EXE1 Figure b2, there is no “clear search” feature on the search interface, making it challenging for BVI (text with tooltip) The acronym for Blind and Visually Impaired. It refers to BVI users who rely on screen readers to interact with digital libraries (DLs). users to clear searches made.

EXE1 Figure b2. Screenshot of difficulty clearing a search box
Resources
- a11ymatters. (n.d.). Providing an accessible a clear search label.
- Apple Support. (n.d.). Use Voice Control to interact with iPhone.
- Carvalho, M., Dias, F., Reis, A., and Freire, A. (2018). Accessibility and usability problems encountered on websites and applications in mobile devices by blind and normal-vision users. In Proceedings of the 33rd Annual ACM Symposium on Applied Computing (SAC ’18). Association for Computing Machinery, New York, NY, USA, 2022–2029.
- David S. (2023). Breaking Barriers: How AI Transforms Website Accessibility for Users with Disabilities.
- Harvard University (2016). Accessible names for buttons.
- Rodrigues, A., Nicolau, H., Montague, K., Guerreiro, J., & Guerreiro, T. (2020). Open challenges of blind people using smartphones. International Journal of Human–Computer Interaction, 36(17), 1605–1622.
- Stack Exchange (2023). Is a “Clear input” button only for search fields?.
- Stack Exchange. (n.d.). Providing general help information within or near the search box, clearly indicating how to clear search queries.
- WebAIM. (n.d.). Usable and Accessible Form Validation and Error Recovery.