?
avatar zwiastunsw
zwiastunsw
4 Apr 2019

Steps to reproduce the issue

  1. Use screen reader, e.g. NVDA
  2. Go to the search results list page (for ex. use search module to search for a popular word, e.g. joomla on a test site)
  3. Go to serach field
    or
    Inspect the code

Expected result

  • The screen reader should announce a label for the search box

or

  • The code should include a label for the field "Search" (label for="search-searchword"

Actual result

Screen reader does not announce the name of the field
The field has no labels.

avatar zwiastunsw zwiastunsw - open - 4 Apr 2019
avatar joomla-cms-bot joomla-cms-bot - change - 4 Apr 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Apr 2019
avatar hardik-codes
hardik-codes - comment - 4 Apr 2019

Working on it

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Status New Information Required
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Category Accessibility com_search
avatar hardik-codes
hardik-codes - comment - 4 Apr 2019

@zwiastunsw
id="q" is already there in
<input type="text" name="q"
then why the issue still persists?

avatar zwiastunsw
zwiastunsw - comment - 4 Apr 2019

I don't understand. You show a piece of code, but you don't write where it comes from.
This is piece of from "com_search/views/search/tmpl/default_form.php":

<div class="btn-group pull-left">
   <input type="text" name="searchword" title="<?php echo JText::_('COM_SEARCH_SEARCH_KEYWORD'); ?>" placeholder="<?php echo JText::_('COM_SEARCH_SEARCH_KEYWORD'); ?>" id="search-searchword" size="30" maxlength="<?php echo $upper_limit; ?>" value="<?php echo $this->escape($this->origkeyword); ?>" class="inputbox" />
</div>

In this code there is no label for="search-searchword"
The label may be hidden for sighted users, but it must exist for users of screen readers. To hide the label from sighted users, use the class="element-invisible" for label tag.

avatar hardik-codes
hardik-codes - comment - 4 Apr 2019

My bad
I missed out giving the file name
Really sorry

avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Title
[3.9.x][a11y] Search field has no label
[3.9.x] [a11y] Search field has no label
avatar franz-wohlkoenig franz-wohlkoenig - edited - 4 Apr 2019
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 4 Apr 2019

closed as having Pull Request #24482

avatar franz-wohlkoenig franz-wohlkoenig - close - 4 Apr 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2019-04-04 12:40:47
Closed_By franz-wohlkoenig

Add a Comment

Login with GitHub to post a comment