unimelb / unimelb-design-system

A complete design system for the University of Melbourne
https://web.unimelb.edu.au
30 stars 12 forks source link

Search fieldset #901

Open anormand opened 7 years ago

anormand commented 7 years ago

Expected behaviour

When assistive technologies encounter the search form they should identify it as having a role of search

Actual behaviour

There is a fieldset without a legend. The fieldset isn't required because there is only one input field.

Steps to reproduce

  1. Go to http://www.unimelb.edu.au/accessibility
  2. View source
  3. Source will be as follows:
    <form class="search" method="get" action="https://search.unimelb.edu.au">
    <fieldset>
    <div class="inline attached">
      <span class="fill">
        <input aria-label="Search the University" id="header_q" type="search" placeholder="Search the University" name="q">
      </span>
      <span>
        <button class="inline-button" type="submit">
          <span class="small icon--hide-label" data-icon="search" data-bound="true"><svg role="img" class="icon" focusable="3"><use></use></svg><div class="icon-label">Go</div></span>
        </button>
      </span>
    </div>
    </fieldset>
    <a class="page-header-icon" href="http://www.unimelb.edu.au/accessibility/_nocache#" data-bound="true"><svg role="img" class="icon"><use></use></svg> Close</a>
    </form>

Steps to remedy defect

  1. Change: <form class="search" method="get" action="https://search.unimelb.edu.au"> to: <form class="search" method="get" action="https://search.unimelb.edu.au" role="search">

  2. Delete the fieldset

    <form class="search" method="get" action="https://search.unimelb.edu.au" role="search">
    <div class="inline attached">