Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing comparison table accessibility issues (#435). Fix #318 #435

Merged
merged 7 commits into from
Feb 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,27 @@
<thead>
<tr>
{% for col in value.comparison_table.columns %}
<th>{{ col.heading }}</th>
{% if col.heading %}
<th scope="col">{{ col.heading }}</th>
{% else %}
<td></td>
{% endif %}
{% endfor %}
</tr>
</thead>
<tbody>
{% endif %}
<tr>
{% for block in row %}
<td>
{% include_block block %}
</td>
{% if forloop.first %}
<th scope="row">
{{ block }}
</th>
{% else %}
<td>
{% include_block block %}
</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
Expand Down
23 changes: 12 additions & 11 deletions wagtailio/static/sass/components/_comparison-table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
grid-column: 2 / span 5;
}

td:first-child {
font-weight: $weight--bold;
width: 150px;

@include media-query(large) {
width: 250px
}
}

tbody {
grid-column: 2 / span 2;
grid-gap: 20px;
Expand All @@ -34,14 +25,24 @@
grid-column: 2 / span 5;
}

th {
// stylelint-disable-next-line declaration-property-value-allowed-list
text-align: left;
font-weight: $weight--bold;
width: 150px;

@include media-query(large) {
width: 250px
}
}

> tr:last-child {
td {
td, th {
border: unset;
}
}
}


td,
th {
padding: 20px 20px 20px 0;
Expand Down