GSA-TTS/all_sorns

a11y: List contains elements that should be outside of the list

Closed this issue · 0 comments

Description:

There is a div with a nav element (for pagination) as a direct child of the parent unordered list in the search results page. This could be confusing and/or problematic for screen reader users. Per Accessibility Insights, "<ul> and <ol> must only directly contain <li>, <script> or <template> elements. See more info here."

Screenshot:

screenshot of list with problematic children

WCAG SC:

Success Criterion 1.3.1 Info and Relationships (Level A): Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text.

Location of code:
/app/views/sorns/search.html.erb, Line 168

Recommended fix:

Move the following code to just after the closing </ul> element:

<div class="grid-offset-6 grid-col-6 margin-bottom-3">
  <%= paginate @sorns %>
</div>