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

Fix lighthouse regressions #1216

Merged
merged 1 commit into from
Aug 18, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/static/css/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,7 @@
}

.authors .social a {
margin-right: 10px;
margin-right: 0.625rem;
margin: 0.25rem 1rem 0.25rem 0;
white-space: nowrap;
display: inline-flex;
align-items: center;
Expand All @@ -298,7 +297,7 @@
}

.authors .social svg {
width: 1em;
width: 1.5em;
height: auto;
margin-right: 4px;
margin-right: 0.25rem;
Expand Down
8 changes: 4 additions & 4 deletions src/templates/base/2019/base_chapter.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h2 id="authors">
<div class="social">
{% if authordata.twitter %}
<a class="twitter" href="https://twitter.com/{{ authordata.twitter }}" aria-labelledby="author-{{ author }}-twitter">
<svg width="22" height="22" role="img" aria-hidden>
<svg width="22" height="22" role="img">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why there is role="img" here and not on other pictos?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give me an example where it's not set? Just did a search for <svg and always seems to be set to me?

It's not necessary for <img> elements as they are directly mapped to images, whereas <svg>'s may not be. Is that what you mean?

<title id="author-{{ author }}-twitter">{{ onTwitter(authordata.twitter) }}</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#twitter"></use>
</svg>
Expand All @@ -143,7 +143,7 @@ <h2 id="authors">
{% endif %}
{% if authordata.github %}
<a class="github" href="https://github.com/{{ authordata.github }}" aria-labelledby="author-{{ author }}-github">
<svg width="22" height="22" aria-hidden>
<svg width="22" height="22">
<title id="author-{{ author }}-github">{{ onGitHub(authordata.github) }}</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#github"></use>
</svg>
Expand All @@ -152,7 +152,7 @@ <h2 id="authors">
{% endif %}
{% if authordata.linkedin %}
<a class="linkedin" href="https://www.linkedin.com/in/{{ authordata.linkedin }}/" aria-labelledby="author-{{ author }}-linkedin">
<svg width="22" height="22" aria-hidden>
<svg width="22" height="22">
<title id="author-{{ author }}-linkedin">{{ onLinkedIn(authordata.name) }}</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#linkedin"></use>
</svg>
Expand All @@ -161,7 +161,7 @@ <h2 id="authors">
{% endif %}
{% if authordata.website %}
<a class="website" href="{{ authordata.website }}" aria-labelledby="author-{{ author }}-website">
<svg width="22" height="22" aria-hidden>
<svg width="22" height="22">
<title id="author-{{ author }}-website">{{ website(authordata.name) }}</title>
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#globe"></use>
</svg>
Expand Down