Skip to content

Commit 634f0d6

Browse files
aclark4lifeCopilot
andcommitted
Address Copilot review: a11y icons, footer list reset, back-to-top, link
- Mark decorative Font Awesome icons aria-hidden and add a space before adjacent label text (nav/hero/footer sponsor buttons, section headings, back-to-top arrow) - Reset margin/padding on .footer-col ul to avoid inconsistent browser default indentation - Guard back-to-top.js "at bottom" detection so it doesn't incorrectly show the button on short, non-scrollable pages - Drop the bare trailing "#" from the Pillow 9.0.0 release notes link Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b358874 commit 634f0d6

3 files changed

Lines changed: 19 additions & 15 deletions

File tree

assets/css/pillow.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,8 @@ section {
641641
list-style: none;
642642
display: grid;
643643
gap: .6rem;
644+
margin: 0;
645+
padding: 0;
644646
}
645647

646648
.footer-col a,

assets/js/back-to-top.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
function update() {
1111
var scrollY = window.scrollY || window.pageYOffset;
12-
var atBottom = window.innerHeight + scrollY >= document.documentElement.scrollHeight - 4;
12+
var pageHeight = document.documentElement.scrollHeight;
13+
var isScrollable = pageHeight > window.innerHeight;
14+
var atBottom = isScrollable && window.innerHeight + scrollY >= pageHeight - 4;
1315
button.classList.toggle("is-visible", scrollY > SHOW_AFTER_PX || atBottom);
1416
ticking = false;
1517
}

index.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
<a href="#history">History</a>
4040
</nav>
4141
<a class="btn btn-sponsor btn-sm" href="#sponsor">
42-
<i class="fas fa-heart"></i>Sponsor</a>
42+
<i class="fas fa-heart" aria-hidden="true"></i> Sponsor</a>
4343
<a class="icon-link" target="_blank" rel="noopener noreferrer" href="https://github.com/python-pillow/Pillow" aria-label="GitHub">
44-
<i class="fab fa-github"></i></a>
44+
<i class="fab fa-github" aria-hidden="true"></i></a>
4545
<a class="icon-link" target="_blank" href="https://fosstodon.org/@pillow" rel="me noopener noreferrer" aria-label="Mastodon">
46-
<i class="fab fa-mastodon"></i></a>
46+
<i class="fab fa-mastodon" aria-hidden="true"></i></a>
4747
</div>
4848
</div>
4949
</header>
@@ -62,7 +62,7 @@ <h1>Pillow</h1>
6262
<a class="btn btn-primary btn-lg" target="_blank" rel="noopener noreferrer" href="https://pypi.org/project/pillow/">Download from PyPI</a>
6363
<a class="btn btn-outline btn-lg" target="_blank" rel="noopener noreferrer" href="https://pillow.readthedocs.io/">Read the docs</a>
6464
<a class="btn btn-sponsor btn-lg" href="#sponsor">
65-
<i class="fas fa-heart"></i>Sponsor</a>
65+
<i class="fas fa-heart" aria-hidden="true"></i> Sponsor</a>
6666
</div>
6767
</div>
6868
<div class="hero-art">
@@ -114,7 +114,7 @@ <h3>Source Code</h3>
114114
<section id="sponsor" class="sponsor">
115115
<div class="wrap">
116116
<div class="section-head center">
117-
<h2><i class="fas fa-heart"></i> Support Pillow's Future</h2>
117+
<h2><i class="fas fa-heart" aria-hidden="true"></i> Support Pillow's Future</h2>
118118
<p>
119119
Pillow is free, open source software maintained by volunteers who review pull requests,
120120
fix bugs, write documentation, and ship regular releases &mdash; all in their spare time.
@@ -124,13 +124,13 @@ <h2><i class="fas fa-heart"></i> Support Pillow's Future</h2>
124124
</p>
125125
</div>
126126
<div class="sponsor-grid">
127-
<div class="sponsor-chip"><i class="fas fa-shield-halved"></i>Fund security fixes and long-term maintenance</div>
128-
<div class="sponsor-chip"><i class="fas fa-code-branch"></i>Prioritize reviewing PRs and issues</div>
129-
<div class="sponsor-chip"><i class="fas fa-users"></i>Sustain the maintainers who ship Pillow</div>
127+
<div class="sponsor-chip"><i class="fas fa-shield-halved" aria-hidden="true"></i> Fund security fixes and long-term maintenance</div>
128+
<div class="sponsor-chip"><i class="fas fa-code-branch" aria-hidden="true"></i> Prioritize reviewing PRs and issues</div>
129+
<div class="sponsor-chip"><i class="fas fa-users" aria-hidden="true"></i> Sustain the maintainers who ship Pillow</div>
130130
</div>
131131
<div style="text-align: center;">
132132
<a class="btn btn-sponsor-light btn-lg" target="_blank" rel="noopener noreferrer" href="https://github.com/sponsors/python-pillow">
133-
<i class="fas fa-heart"></i>Become a GitHub Sponsor</a>
133+
<i class="fas fa-heart" aria-hidden="true"></i> Become a GitHub Sponsor</a>
134134
</div>
135135
</div>
136136
</section>
@@ -248,7 +248,7 @@ <h2>From PIL to <span class="highlight">Pillow</span></h2>
248248
<div class="memory">
249249
<a target="_blank" rel="noopener noreferrer" href="https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#fredrik-lundh">In memory of Fredrik Lundh</a>
250250
<p class="memory-note">
251-
<a target="_blank" rel="noopener noreferrer" href="https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html#">Pillow 9.0.0</a> was dedicated to the memory of Fredrik Lundh, aka Effbot, who died in
251+
<a target="_blank" rel="noopener noreferrer" href="https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html">Pillow 9.0.0</a> was dedicated to the memory of Fredrik Lundh, aka Effbot, who died in
252252
November 2021. Fredrik created PIL in 1995 and was instrumental in the
253253
<a target="_blank" rel="noopener noreferrer" href="https://mail.python.org/archives/list/python-dev@python.org/thread/36Q5QBILL3QIFIA3KHNGFBNJQKXKN7SD/">early success of Python</a>.
254254
</p>
@@ -267,9 +267,9 @@ <h2>From PIL to <span class="highlight">Pillow</span></h2>
267267
<p>The Python Imaging Library, maintained by a community of volunteers since 2010.</p>
268268
<div class="footer-social">
269269
<a class="icon-link" target="_blank" rel="noopener noreferrer" href="https://github.com/python-pillow/Pillow" aria-label="GitHub">
270-
<i class="fab fa-github"></i></a>
270+
<i class="fab fa-github" aria-hidden="true"></i></a>
271271
<a class="icon-link" target="_blank" href="https://fosstodon.org/@pillow" rel="me noopener noreferrer" aria-label="Mastodon">
272-
<i class="fab fa-mastodon"></i></a>
272+
<i class="fab fa-mastodon" aria-hidden="true"></i></a>
273273
</div>
274274
</div>
275275
<div class="footer-col">
@@ -291,7 +291,7 @@ <h4>Community</h4>
291291
</ul>
292292
</div>
293293
<div class="footer-col footer-sponsor">
294-
<h4><i class="fas fa-heart"></i> Support Pillow</h4>
294+
<h4><i class="fas fa-heart" aria-hidden="true"></i> Support Pillow</h4>
295295
<p>Pillow is maintained by volunteers. Sponsorship funds security fixes, reviews and new features.</p>
296296
<a class="btn btn-sponsor btn-sm" target="_blank" rel="noopener noreferrer" href="https://github.com/sponsors/python-pillow">Become a Sponsor</a>
297297
</div>
@@ -307,7 +307,7 @@ <h4><i class="fas fa-heart"></i> Support Pillow</h4>
307307
</footer>
308308

309309
<a class="back-to-top" href="#top" aria-label="Back to top">
310-
<i class="fas fa-arrow-up"></i>
310+
<i class="fas fa-arrow-up" aria-hidden="true"></i>
311311
</a>
312312

313313
<script src="assets/js/back-to-top.js"></script>

0 commit comments

Comments
 (0)