Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.9.x] [a11y] Search field has no label #24467

Closed
zwiastunsw opened this issue Apr 4, 2019 · 5 comments
Closed

[3.9.x] [a11y] Search field has no label #24467

zwiastunsw opened this issue Apr 4, 2019 · 5 comments

Comments

@zwiastunsw
Copy link
Contributor

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.

@hardik-codes
Copy link
Contributor

Working on it

@hardik-codes
Copy link
Contributor

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

@zwiastunsw
Copy link
Contributor Author

zwiastunsw commented Apr 4, 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.

@hardik-codes
Copy link
Contributor

My bad
I missed out giving the file name
Really sorry

@ghost ghost changed the title [3.9.x][a11y] Search field has no label [3.9.x] [a11y] Search field has no label Apr 4, 2019
@ghost
Copy link

ghost commented Apr 4, 2019

closed as having Pull Request #24482

@ghost ghost closed this as completed Apr 4, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants