Skip to content

Commit 4302401

Browse files
committed
general: improve accessibility
1 parent 0e87263 commit 4302401

File tree

8 files changed

+659
-555
lines changed

8 files changed

+659
-555
lines changed

src/PHPDraft/Out/HTML/default/structure.twig

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
{% if structure.value is iterable %}
1515
{% if structure is object_type %}
1616
<table class="table table-striped mdl-data-table mdl-js-data-table">
17+
<caption>Object: {{ name }}</caption>
1718
{% for value in structure.value %}
1819
{{ value|raw }}
1920
{% endfor %}

src/PHPDraft/Out/HTML/default/transition.twig

+7-5
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@
7272
<h5>URI Parameters</h5>
7373
<div class="row">
7474
<table class="table table-striped mdl-data-table mdl-js-data-table ">
75+
<caption>URI Parameter values</caption>
7576
<thead>
7677
<tr>
77-
<td>key</td>
78-
<td>type</td>
79-
<td>status</td>
80-
<td>description</td>
81-
<td>value</td>
78+
<th>key</th>
79+
<th>type</th>
80+
<th>status</th>
81+
<th>description</th>
82+
<th>value</th>
8283
</tr>
8384
</thead>
8485
<tbody>
@@ -130,6 +131,7 @@
130131
<h5>Data Structure</h5>
131132
<div class="row">
132133
<table class="table table-striped mdl-data-table mdl-js-data-table">
134+
<caption>Transaction data structure</caption>
133135
{% for value in response.structure %}{{ value|raw }}{% endfor %}
134136
</table>
135137
</div>

src/PHPDraft/Out/HTML/material/nav.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<li class="collection-header"> <a href="#{{ category.get_href }}">{{ category.title }}</a></li>
66
{% for resource in category.children %}
77
<li class="collection-item resource" aria-label="Resource {{category.title}}/{{resource.title}}">
8-
<b><a class="nav-link" href="#{{ resource.get_href|replace({'-': '/'}) }}">{{resource.title}}</a></b>
8+
<strong><a class="nav-link" href="#{{ resource.get_href|replace({'-': '/'}) }}">{{resource.title}}</a></strong>
99
{% for transition in resource.children %}
1010
<a class="nav-link" href="#{{ transition.get_href|replace({'-': '/'}) }}"
1111
aria-label="Transition {{category.title}}/{{resource.title}}/{{ transition.title }}">

src/PHPDraft/Out/HTML/material/transition.twig

+6-5
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@
7272
<h5>URI Parameters</h5>
7373
<div>
7474
<table class="table table-striped mdl-data-table mdl-js-data-table ">
75+
<caption>URI Parameter overview</caption>
7576
<thead>
7677
<tr>
77-
<td>key</td>
78-
<td>type</td>
79-
<td>status</td>
80-
<td>description</td>
81-
<td>value</td>
78+
<th>key</th>
79+
<th>type</th>
80+
<th>status</th>
81+
<th>description</th>
82+
<th>value</th>
8283
</tr>
8384
</thead>
8485
<tbody>

tests/statics/drafter/html/basic.html

+150-125
Large diffs are not rendered by default.

tests/statics/drafter/html/basic_old.html

+150-125
Large diffs are not rendered by default.

tests/statics/drafter/html/material.html

+172-147
Large diffs are not rendered by default.

tests/statics/drafter/html/material_old.html

+172-147
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)