🐛 Add headings, label lists, remove aria-labels for a11y (#109)

Co-authored-by: Tatiana Mac <github@tatianamac.com>
This commit is contained in:
Sarah Higley
2020-05-01 19:12:17 -07:00
committed by GitHub
parent beb2f5db69
commit 48ebe70b99
5 changed files with 10 additions and 7 deletions

View File

@ -7,7 +7,7 @@
<span class="flag__red">{{ definition.data.flag.text }}</span>
{% endif %}
{%- if definition.data.sub_terms -%}
<ul class="sub-terms">
<ul class="sub-terms" role="list" aria-label="{{definition.data.title}}">
{% for term in definition.data.sub_terms %}
<li
class="subterm"

View File

@ -1,10 +1,11 @@
<section>
<nav class="" aria-label="Definitions">
<h2 id="terms-heading" class="visually-hidden">Terms</h2>
<nav class="" aria-labelledby="terms-heading">
<ol class="multi-column u-no-padding-left list">
{% for section in collections.tableOfContent %}
<li>
<span class="sub-headline">{{ section.title }}</span>
<ol class="toc__list">
<h3 class="sub-headline" id="list{{loop.index}}">{{ section.title }}</h3>
<ol class="toc__list" role="list" aria-labelledby="list{{loop.index}}">
{% for definition in section.definitions %}
{% include 'components/table-of-content-item.njk' %}
{% endfor %}