Skip to content
Open
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
47 changes: 26 additions & 21 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function Layout({ children, stats }: LayoutProps) {
}}
>
{/* Top bar */}
<div
<header
style={{
borderBottom: '1px solid var(--color-border)',
}}
Expand Down Expand Up @@ -184,9 +184,9 @@ export function Layout({ children, stats }: LayoutProps) {
</button>
</div>
</div>
</div>
</header>

<div
<main
style={{
maxWidth: 860,
margin: '0 auto',
Expand Down Expand Up @@ -220,33 +220,38 @@ export function Layout({ children, stats }: LayoutProps) {

{/* Page content */}
{children}
</div>
</main>

{/* Fixed bottom-left attribution */}
<a
href="https://nullrabbit.ai"
target="_blank"
rel="noopener noreferrer"
<footer
style={{
position: 'fixed',
bottom: isMobile ? 16 : 24,
left: isMobile ? 16 : 24,
display: 'flex',
alignItems: 'center',
gap: 5,
color: 'var(--color-text-dim)',
textDecoration: 'none',
fontSize: 10,
fontFamily: "'JetBrains Mono', monospace",
zIndex: 100,
}}
>
<img
src="/nullrabbit.png"
alt="NullRabbit"
style={{ height: 22, width: 22, objectFit: 'contain' }}
/>
</a>
<a
href="https://nullrabbit.ai"
target="_blank"
rel="noopener noreferrer"
style={{
display: 'flex',
alignItems: 'center',
gap: 5,
color: 'var(--color-text-dim)',
textDecoration: 'none',
fontSize: 10,
fontFamily: "'JetBrains Mono', monospace",
}}
>
<img
src="/nullrabbit.png"
alt="NullRabbit"
style={{ height: 22, width: 22, objectFit: 'contain' }}
/>
</a>
</footer>

<WaitlistDrawer />
</div>
Expand Down
10 changes: 5 additions & 5 deletions src/components/TabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function TabBar() {
const { pathname } = useLocation();
const isMobile = useIsMobile();
const [open, setOpen] = useState(false);
const containerRef = useRef<HTMLDivElement>(null);
const containerRef = useRef<HTMLElement>(null);

const currentTab = TABS.find(t => t.path === pathname) ?? TABS[0];

Expand Down Expand Up @@ -53,7 +53,7 @@ export function TabBar() {
// Desktop: horizontal tab bar (unchanged)
if (!isMobile) {
return (
<div
<nav
style={{
display: 'flex',
gap: 0,
Expand Down Expand Up @@ -86,13 +86,13 @@ export function TabBar() {
</Link>
);
})}
</div>
</nav>
);
}

// Mobile: dropdown trigger + menu
return (
<div ref={containerRef} style={{ position: 'relative', marginBottom: 12 }}>
<nav ref={containerRef} style={{ position: 'relative', marginBottom: 12 }}>
<button
onClick={() => setOpen(prev => !prev)}
aria-expanded={open}
Expand Down Expand Up @@ -172,6 +172,6 @@ export function TabBar() {
})}
</div>
)}
</div>
</nav>
);
}
11 changes: 6 additions & 5 deletions src/components/ValidatorProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function computeVerdict(events: ValidatorEventItem[]): Verdict {

const sectionHeadingStyle: React.CSSProperties = {
fontSize: 12,
fontWeight: 400,
color: 'var(--color-text-heading)',
fontFamily: "'JetBrains Mono', monospace",
textTransform: 'uppercase',
Expand Down Expand Up @@ -658,7 +659,7 @@ export function ValidatorProfile() {
: 'var(--color-danger)';
return (
<div style={{ marginBottom: 24, paddingBottom: 24, borderBottom: '1px solid var(--color-border)' }}>
<div style={sectionHeadingStyle}>Reliability</div>
<h2 style={sectionHeadingStyle}>Reliability</h2>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Since the validator name is defined as an <h2> (on line 467), sub-sections like "Reliability" should use <h3> to maintain a proper heading hierarchy. This helps screen reader users understand the document structure more effectively.

Suggested change
<h2 style={sectionHeadingStyle}>Reliability</h2>
<h3 style={sectionHeadingStyle}>Reliability</h3>

<div style={{ marginTop: 12 }}>
<div style={metaLabelStyle}>Delinquency</div>
<div style={{ ...metaValueStyle, color }}>
Expand All @@ -673,9 +674,9 @@ export function ValidatorProfile() {
{chainData && <ChainDataSections chainData={chainData} isMobile={isMobile} />}

{/* Event history header */}
<div style={sectionHeadingStyle}>
<h2 style={sectionHeadingStyle}>
event history
</div>
</h2>
Comment on lines +677 to +679
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To maintain a consistent and correct heading hierarchy, this sub-section should use an <h3> tag, as it is logically nested under the validator's name (<h2>).

Suggested change
<h2 style={sectionHeadingStyle}>
event history
</div>
</h2>
<h3 style={sectionHeadingStyle}>
event history
</h3>


{titleGroups.length === 0 ? (
<div
Expand Down Expand Up @@ -865,9 +866,9 @@ export function ValidatorProfile() {
{/* Infrastructure section */}
{showInfrastructure && (
<div style={{ marginTop: 32 }}>
<div style={sectionHeadingStyle}>
<h2 style={sectionHeadingStyle}>
infrastructure
</div>
</h2>
Comment on lines +869 to +871
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

This section should be an <h3> to correctly reflect its position in the document outline relative to the main validator heading.

Suggested change
<h2 style={sectionHeadingStyle}>
infrastructure
</div>
</h2>
<h3 style={sectionHeadingStyle}>
infrastructure
</h3>


<div
style={
Expand Down
11 changes: 6 additions & 5 deletions src/pages/LeaderboardPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ export default function LeaderboardPage() {
return (
<div style={{ marginTop: 8 }}>
{/* Heading */}
<div
<h2
style={{
fontSize: 11,
fontWeight: 400,
fontFamily: "'JetBrains Mono', monospace",
textTransform: 'uppercase',
letterSpacing: '0.08em',
Expand All @@ -88,17 +89,17 @@ export default function LeaderboardPage() {
}}
>
{sort === 'worst' ? 'Worst Offenders' : 'Most Reliable'}
</div>
<div
</h2>
<p
style={{
fontSize: 12,
fontFamily: "'Inter', sans-serif",
color: 'var(--color-text-tertiary)',
marginBottom: 16,
margin: '0 0 16px',
}}
>
Validators ranked by incident severity over {periodLabel}
</div>
</p>

{/* Controls */}
<div style={{ display: 'flex', flexWrap: 'wrap', gap: isMobile ? 6 : 8, marginBottom: 16, alignItems: 'center' }}>
Expand Down
5 changes: 3 additions & 2 deletions src/pages/ReportsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ export default function ReportsPage() {

return (
<div>
<div
<h2
style={{
fontSize: 11,
fontWeight: 400,
fontFamily: monoFont,
textTransform: 'uppercase',
letterSpacing: '0.08em',
Expand All @@ -70,7 +71,7 @@ export default function ReportsPage() {
}}
>
Provider Reliability Reports
</div>
</h2>

{/* Search input */}
<input
Expand Down
Loading