Skip to content

Commit

Permalink
Merge pull request #63 from AutoSponge/master
Browse files Browse the repository at this point in the history
fix(a11y): removes invalid role=text
  • Loading branch information
Andy-set-studio authored and bmuenzenmeyer committed Apr 17, 2020
1 parent 356522e commit d6e48ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/docs/src/_includes/layouts/post.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% if date %}
<time datetime="{{ date | w3DateFilter }}" class="dt-published">{{ date | dateFilter }}</time>
{% endif %}
<span role="text">— {{ helpers.getReadingTime(content) }} minute read</span>
<span>— {{ helpers.getReadingTime(content) }} minute read</span>
</p>
{% endset %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<nav class="[ pagination__nav ] [ box-flex space-between align-center ]">
{% if paginationPrevUrl %}
<a href="{{ paginationPrevUrl }}" class="{{ paginationLinkTokens }}" data-direction="backwards">
<span role="text">{{ paginationPrevText if paginationPrevText else 'Previous' }}</span>
<span>{{ paginationPrevText if paginationPrevText else 'Previous' }}</span>
{% include "icons/arrow.svg" %}
</a>
{% endif %}
{% if paginationNextUrl %}
<a href="{{ paginationNextUrl }}" class="{{ paginationLinkTokens }}" data-direction="forwards">
<span role="text">{{ paginationNextText if paginationNextText else 'Next' }}</span>
<span>{{ paginationNextText if paginationNextText else 'Next' }}</span>
{% include "icons/arrow.svg" %}
</a>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/transforms/parse-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = function(value, outputPath) {
anchor.setAttribute('href', `#heading-${headingSlug}`);
anchor.classList.add('heading-permalink');
anchor.innerHTML = minify(`
<span role="text" class="visually-hidden"> permalink</span>
<span class="visually-hidden"> permalink</span>
<svg fill="currentColor" aria-hidden="true" focusable="false" width="1em" height="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M9.199 13.599a5.99 5.99 0 0 0 3.949 2.345 5.987 5.987 0 0 0 5.105-1.702l2.995-2.994a5.992 5.992 0 0 0 1.695-4.285 5.976 5.976 0 0 0-1.831-4.211 5.99 5.99 0 0 0-6.431-1.242 6.003 6.003 0 0 0-1.905 1.24l-1.731 1.721a.999.999 0 1 0 1.41 1.418l1.709-1.699a3.985 3.985 0 0 1 2.761-1.123 3.975 3.975 0 0 1 2.799 1.122 3.997 3.997 0 0 1 .111 5.644l-3.005 3.006a3.982 3.982 0 0 1-3.395 1.126 3.987 3.987 0 0 1-2.632-1.563A1 1 0 0 0 9.201 13.6zm5.602-3.198a5.99 5.99 0 0 0-3.949-2.345 5.987 5.987 0 0 0-5.105 1.702l-2.995 2.994a5.992 5.992 0 0 0-1.695 4.285 5.976 5.976 0 0 0 1.831 4.211 5.99 5.99 0 0 0 6.431 1.242 6.003 6.003 0 0 0 1.905-1.24l1.723-1.723a.999.999 0 1 0-1.414-1.414L9.836 19.81a3.985 3.985 0 0 1-2.761 1.123 3.975 3.975 0 0 1-2.799-1.122 3.997 3.997 0 0 1-.111-5.644l3.005-3.006a3.982 3.982 0 0 1 3.395-1.126 3.987 3.987 0 0 1 2.632 1.563 1 1 0 0 0 1.602-1.198z"/>
</svg>`);
Expand Down

0 comments on commit d6e48ee

Please sign in to comment.