[Koha-bugs] [Bug 28140] New: Accessibility: OPAC - "sort_by" select isn't labelled on search results page

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Apr 13 12:31:10 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28140

            Bug ID: 28140
           Summary: Accessibility: OPAC - "sort_by"  select isn't labelled
                    on search results page
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: OPAC
          Assignee: oleonard at myacpl.org
          Reporter: bolshawh at parliament.uk
        QA Contact: testopia at bugs.koha-community.org

The <select> element used to sort search results on the OPAC search results
page (opac-search.pl) isn't labelled. This makes it harder for users of screen
readers and other assistive technologies to identify the purpose of the sort
function.


<select id="sort_by" class="resort form-control form-control-sm"
name="sort_by">

should become:

<label for="sort_by" class="sr-only">Sort by:</label>
<select id="sort_by" class="resort form-control form-control-sm"
name="sort_by">

We should add a <label> with class .sr-only to identify this to screenreaders
only because the purpose of the sort function is clear from visual context. (We
could use an aria-label instead of <label> but the 'first rule of ARIA' is to
use native HTML where possible:

"2.1 First Rule of ARIA Use
If you can use a native HTML element [HTML51] or attribute with the semantics
and behavior you require already built in, instead of re-purposing an element
and adding an ARIA role, state or property to make it accessible, then do so."
(From https://www.w3.org/TR/using-aria/#firstrule)

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list