Skip to content

Commit

Permalink
general: improve accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
SMillerDev committed May 31, 2022
1 parent 0e87263 commit 4302401
Show file tree
Hide file tree
Showing 8 changed files with 659 additions and 555 deletions.
1 change: 1 addition & 0 deletions src/PHPDraft/Out/HTML/default/structure.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{% if structure.value is iterable %}
{% if structure is object_type %}
<table class="table table-striped mdl-data-table mdl-js-data-table">
<caption>Object: {{ name }}</caption>
{% for value in structure.value %}
{{ value|raw }}
{% endfor %}
Expand Down
12 changes: 7 additions & 5 deletions src/PHPDraft/Out/HTML/default/transition.twig
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@
<h5>URI Parameters</h5>
<div class="row">
<table class="table table-striped mdl-data-table mdl-js-data-table ">
<caption>URI Parameter values</caption>
<thead>
<tr>
<td>key</td>
<td>type</td>
<td>status</td>
<td>description</td>
<td>value</td>
<th>key</th>
<th>type</th>
<th>status</th>
<th>description</th>
<th>value</th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -130,6 +131,7 @@
<h5>Data Structure</h5>
<div class="row">
<table class="table table-striped mdl-data-table mdl-js-data-table">
<caption>Transaction data structure</caption>
{% for value in response.structure %}{{ value|raw }}{% endfor %}
</table>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/PHPDraft/Out/HTML/material/nav.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<li class="collection-header"> <a href="#{{ category.get_href }}">{{ category.title }}</a></li>
{% for resource in category.children %}
<li class="collection-item resource" aria-label="Resource {{category.title}}/{{resource.title}}">
<b><a class="nav-link" href="#{{ resource.get_href|replace({'-': '/'}) }}">{{resource.title}}</a></b>
<strong><a class="nav-link" href="#{{ resource.get_href|replace({'-': '/'}) }}">{{resource.title}}</a></strong>
{% for transition in resource.children %}
<a class="nav-link" href="#{{ transition.get_href|replace({'-': '/'}) }}"
aria-label="Transition {{category.title}}/{{resource.title}}/{{ transition.title }}">
Expand Down
11 changes: 6 additions & 5 deletions src/PHPDraft/Out/HTML/material/transition.twig
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@
<h5>URI Parameters</h5>
<div>
<table class="table table-striped mdl-data-table mdl-js-data-table ">
<caption>URI Parameter overview</caption>
<thead>
<tr>
<td>key</td>
<td>type</td>
<td>status</td>
<td>description</td>
<td>value</td>
<th>key</th>
<th>type</th>
<th>status</th>
<th>description</th>
<th>value</th>
</tr>
</thead>
<tbody>
Expand Down
275 changes: 150 additions & 125 deletions tests/statics/drafter/html/basic.html

Large diffs are not rendered by default.

275 changes: 150 additions & 125 deletions tests/statics/drafter/html/basic_old.html

Large diffs are not rendered by default.

319 changes: 172 additions & 147 deletions tests/statics/drafter/html/material.html

Large diffs are not rendered by default.

319 changes: 172 additions & 147 deletions tests/statics/drafter/html/material_old.html

Large diffs are not rendered by default.

0 comments on commit 4302401

Please sign in to comment.