Skip to content

Commit acd0238

Browse files
committed
redesign(QA): accessibility, performance and polish fixes
- Publications: year headings h3 -> h2 (heading order); reserve filter-bar space to remove layout shift (CLS 0.2 -> 0, mobile perf 85 -> 95) - Home: hero copy can shrink (no overflow with a long NEW pill at 375px); selected publications without year headers, with spacing; 24px touch targets in hero meta - Print stylesheet for posts and pages - People profiles: contact icons inline with their text (CSS only) - Research: index highlight resets when scrolling back to top - _config.yml exclude: README.md, Rakefile, scripts, LICENSE (not published)
1 parent 90563a8 commit acd0238

8 files changed

Lines changed: 34 additions & 7 deletions

File tree

‎_config.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ exclude:
3939
- js/transition.js
4040
- js/zoom.js
4141
- css/zoom.css
42+
- README.md
43+
- Rakefile
44+
- scripts
45+
- LICENSE
4246

4347
# Sass
4448
sass:
@@ -88,7 +92,7 @@ scholar:
8892
order: ascending
8993
group_by: year
9094
group_order: descending
91-
bibliography_group_tag: h3
95+
bibliography_group_tag: h2
9296
bibliography_list_tag: ul
9397
bibliography_item_tag: li
9498
bibliography_list_attributes:

‎_sass/_home.scss‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-2xl); }
1515
}
1616

17+
.hero__copy { min-width: 0; }
1718
.hero__title {
1819
margin: 0 0 var(--space-s);
1920
font-family: var(--font-serif);
@@ -39,7 +40,7 @@
3940
font-size: var(--step--1);
4041
color: var(--text-muted);
4142
}
42-
.hero__meta a { color: var(--text-2); }
43+
.hero__meta a { padding-block: 0.15rem; color: var(--text-2); } /* >= 24px touch target */
4344
.hero__meta a:hover { color: var(--accent-text); }
4445

4546
/* NEW pill (newest news item with `featured: true`) */
@@ -248,6 +249,10 @@
248249
}
249250
.pubs-selected h3, .pubs-selected > h2 { display: none; }
250251
.pubs-selected ul, .pubs-selected ol { list-style: none; margin: 0; padding: 0; }
252+
/* jekyll-scholar emits a duplicate class attribute here, so .pub-list never applies: space the entries explicitly. */
253+
.pubs-selected ul > li { padding: var(--space-s) 0; border-bottom: var(--border-w) solid var(--border); }
254+
.pubs-selected ul > li:first-child { padding-top: 0; }
255+
.pubs-selected ul > li:last-child { border-bottom: 0; }
251256

252257
/* ---------- Lab life ticker ---------- */
253258
.section--band { background: var(--surface-2); border-block: var(--border-w) solid var(--border); }

‎_sass/_pages.scss‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,3 +344,12 @@
344344
text-wrap: balance;
345345
}
346346
.not-found__links { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: var(--space-m) 0 0; padding: 0; list-style: none; }
347+
348+
/* ---------- Print (posts and pages): content only, black on white, external URLs spelled out ---------- */
349+
@media print {
350+
body { background: #fff; color: #000; }
351+
.site-header, .skip, .site-footer, .share, .post-nav, .swarm, .ticker, .home-life__actions { display: none !important; }
352+
.post-body a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
353+
.post-body pre, .post-body img, .post-body figure, .post-body table { break-inside: avoid; }
354+
.post-body img { max-width: 100%; height: auto; }
355+
}

‎_sass/_people.scss‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,9 @@
493493
vertical-align: -0.125em;
494494
color: var(--text-muted);
495495
}
496+
// kramdown emits a line-leading <svg> as its own block and wraps the text after it in a <p>; pull that <p> back onto the icon's line
497+
> .icon + p { display: inline; }
498+
> .icon + p + p { margin-block-start: var(--space-s); }
496499
.sc {
497500
font-variant: small-caps;
498501
font-size: inherit;

‎_sass/_publications.scss‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
&[hidden] { display: none; }
2323
}
24+
// With JS available the bar is shown from first paint (js class is set in <head>), so the list below does not jump when the script runs.
25+
.js .pubs-filters[hidden] { display: grid; }
2426

2527
.pubs-search {
2628
inline-size: 100%;
@@ -50,6 +52,8 @@
5052
font-family: var(--font-mono);
5153
font-size: var(--step--1);
5254
font-variant-numeric: tabular-nums;
55+
56+
&:empty::before { content: "\00a0"; } // reserve the line until the script fills it in
5357
}
5458

5559
.pubs-empty {
@@ -71,8 +75,8 @@
7175
&:focus-visible { outline: var(--focus); outline-offset: var(--focus-offset); }
7276
}
7377

74-
// Year headers (<h3 class="bibliography"> generated by jekyll-scholar) and the lists under them
75-
h3.bibliography {
78+
// Year headers (<h2 class="bibliography"> generated by jekyll-scholar) and the lists under them
79+
h2.bibliography {
7680
margin: var(--space-xl) 0 var(--space-xs);
7781
padding-bottom: var(--space-3xs);
7882
font-family: var(--font-mono);

‎index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ <h2>Publications</h2>
114114
<a class="section-link" href="/publications/">All publications <svg class="icon" aria-hidden="true"><use href="#i-arrow-right"/></svg></a>
115115
</div>
116116
<div class="pubs-selected">
117-
{% bibliography --query @*[selected=true] %}
117+
{% bibliography --group_by none --query @*[selected=true] %}
118118
</div>
119119
</div>
120120
</div>

‎publications.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ lede: Papers from the Swarm Lab and from Sandeep's earlier work. Filter by resea
3636
var chips = [].slice.call(bar.querySelectorAll('.chip'));
3737
var count = bar.querySelector('.pubs-count');
3838
var empty = root.querySelector('.pubs-empty');
39-
var groups = [].slice.call(root.querySelectorAll('h3.bibliography')).map(function (h) {
39+
var groups = [].slice.call(root.querySelectorAll('h2.bibliography')).map(function (h) {
4040
return { head: h, list: h.nextElementSibling, label: h.textContent.trim() };
4141
});
4242
var theme = '', query = '';

‎research.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ lede: We build learning, reasoning, and verification for fleets of robots and AI
115115
var links = [].slice.call(document.querySelectorAll('.research-index__link'));
116116
var map = {};
117117
links.forEach(function (a) { map[a.getAttribute('href').slice(1)] = a; });
118+
var first = links.length ? links[0].getAttribute('href').slice(1) : '';
118119
var io = new IntersectionObserver(function (entries) {
119120
entries.forEach(function (e) {
120-
if (!e.isIntersecting) return;
121+
/* scrolled back above the first section: nothing is current */
122+
if (!e.isIntersecting) { if (e.boundingClientRect.top > 0 && e.target.id === first) links.forEach(function (a) { a.removeAttribute('aria-current'); }); return; }
121123
links.forEach(function (a) { a.removeAttribute('aria-current'); });
122124
var a = map[e.target.id];
123125
if (a) {

0 commit comments

Comments
 (0)