Add News section navigation link to index.html and index_sv.html#96
Add News section navigation link to index.html and index_sv.html#96
Conversation
…uption messaging Co-authored-by: pethers <[email protected]>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
There was a problem hiding this comment.
Pull request overview
Adds a prominent “News” / “Nyheter” navigation block near the top of the main landing pages to link users into the existing news/ section and position the journalism messaging.
Changes:
- Added a styled News navigation callout after the breadcrumb in
index.htmlandindex_sv.html. - Added screenshot PNGs related to the new navigation UI.
Reviewed changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| index.html | Adds a News navigation callout linking to news/. |
| index_sv.html | Adds the Swedish equivalent News navigation callout linking to news/. |
| news-navigation-mobile-en.png | Adds a mobile screenshot asset (not referenced by site code). |
| news-navigation-sv.png | Adds a Swedish screenshot asset (not referenced by site code). |
index.html
Outdated
| <div class="news-navigation" style="background: rgba(0, 217, 255, 0.08); border: 1px solid rgba(0, 217, 255, 0.3); border-radius: 8px; padding: 1rem; margin: 0 1rem 1.5rem 1rem; text-align: center;"> | ||
| <a href="news/" style="color: #00d9ff; text-decoration: none; font-size: 1.1rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem;" aria-label="Visit News section - AI-Disrupted Political Journalism"> | ||
| <span style="font-size: 1.3rem;">📰</span> | ||
| <span>News</span> | ||
| </a> | ||
| <p style="margin: 0.5rem 0 0 0; color: #b0b0b0; font-size: 0.9rem;">AI-Disrupted Political Journalism powered by CIA OSINT</p> |
There was a problem hiding this comment.
The new News navigation block relies on extensive inline styles (colors, spacing, typography). This makes theme changes and reuse harder and duplicates styling logic already present elsewhere (e.g., other inline-styled cards later in the file). Consider moving these declarations into styles.css under .news-navigation (and child selectors) and keep the HTML focused on structure/content, ideally using existing CSS variables for colors/spacings where possible.
There was a problem hiding this comment.
Refactored to use CSS classes in commit fa96555. Moved all inline styles to .news-navigation in styles.css (lines 3186-3246) and now using CSS variables for spacing, colors, and typography.
index_sv.html
Outdated
| <div class="news-navigation" style="background: rgba(0, 217, 255, 0.08); border: 1px solid rgba(0, 217, 255, 0.3); border-radius: 8px; padding: 1rem; margin: 0 1rem 1.5rem 1rem; text-align: center;"> | ||
| <a href="news/" style="color: #00d9ff; text-decoration: none; font-size: 1.1rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem;" aria-label="Besök Nyhetsavsnitt - AI-driven politisk journalistik"> | ||
| <span style="font-size: 1.3rem;">📰</span> | ||
| <span>Nyheter</span> | ||
| </a> | ||
| <p style="margin: 0.5rem 0 0 0; color: #b0b0b0; font-size: 0.9rem;">AI-driven politisk journalistik med CIA OSINT</p> |
There was a problem hiding this comment.
This News navigation block introduces a large inline style payload for layout and colors. For consistency and maintainability, move these styles into styles.css (e.g., .news-navigation, .news-navigation a, .news-navigation p) and reference design tokens/variables instead of hard-coded values so updates apply site-wide.
| <div class="news-navigation" style="background: rgba(0, 217, 255, 0.08); border: 1px solid rgba(0, 217, 255, 0.3); border-radius: 8px; padding: 1rem; margin: 0 1rem 1.5rem 1rem; text-align: center;"> | |
| <a href="news/" style="color: #00d9ff; text-decoration: none; font-size: 1.1rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem;" aria-label="Besök Nyhetsavsnitt - AI-driven politisk journalistik"> | |
| <span style="font-size: 1.3rem;">📰</span> | |
| <span>Nyheter</span> | |
| </a> | |
| <p style="margin: 0.5rem 0 0 0; color: #b0b0b0; font-size: 0.9rem;">AI-driven politisk journalistik med CIA OSINT</p> | |
| <div class="news-navigation"> | |
| <a href="news/" class="news-navigation-link" aria-label="Besök Nyhetsavsnitt - AI-driven politisk journalistik"> | |
| <span class="news-navigation-icon">📰</span> | |
| <span>Nyheter</span> | |
| </a> | |
| <p class="news-navigation-description">AI-driven politisk journalistik med CIA OSINT</p> |
There was a problem hiding this comment.
Applied suggestion in commit fa96555. Replaced inline styles with CSS classes (.news-navigation, .news-navigation a, .news-navigation-icon, .news-navigation p) in styles.css. Now using design tokens and includes dark mode support.
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: pethers <[email protected]>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
index_sv.html
Outdated
|
|
||
| <!-- News Navigation --> | ||
| <div class="news-navigation"> | ||
| <a href="news/" aria-label="Besök Nyhetsavsnitt - AI-driven politisk journalistik"> |
There was a problem hiding this comment.
href="news/" will land Swedish users on news/index.html (English) because /news/ resolves to index.html. Link to the localized Swedish news index instead (e.g. news/index_sv.html) to keep language consistency from index_sv.html.
| <a href="news/" aria-label="Besök Nyhetsavsnitt - AI-driven politisk journalistik"> | |
| <a href="news/index_sv.html" aria-label="Besök Nyhetsavsnitt - AI-driven politisk journalistik"> |
There was a problem hiding this comment.
Fixed in commit b86180d. Swedish link now points to news/index_sv.html for language consistency.
index_sv.html
Outdated
|
|
||
| <!-- News Navigation --> | ||
| <div class="news-navigation"> | ||
| <a href="news/" aria-label="Besök Nyhetsavsnitt - AI-driven politisk journalistik"> |
There was a problem hiding this comment.
The link has visible text “Nyheter”, but the aria-label (“Besök Nyhetsavsnitt - …”) does not contain that visible label. This can break WCAG 2.5.3 (Label in Name) for speech/voice control. Either remove aria-label (letting the link text be the accessible name) or ensure the aria-label includes “Nyheter”.
| <a href="news/" aria-label="Besök Nyhetsavsnitt - AI-driven politisk journalistik"> | |
| <a href="news/" aria-label="Nyheter – AI-driven politisk journalistik"> |
There was a problem hiding this comment.
Fixed in commit b86180d. ARIA label now includes visible text: aria-label="Nyheter – AI-driven politisk journalistik" per WCAG 2.5.3 Label in Name.
| .news-navigation a { | ||
| color: #00d9ff; | ||
| text-decoration: none; | ||
| font-size: var(--font-size-lg); | ||
| font-weight: 600; |
There was a problem hiding this comment.
In light mode the #00d9ff link color is rendered on a very light background (--bg-color is near-white and the callout background is only 8% cyan). This is very likely below WCAG 2.1 AA contrast for normal text. Consider using a darker color in the default (light) theme (or var(--link-color)), and reserve the bright cyan for the dark-mode media query.
There was a problem hiding this comment.
Fixed in commit b86180d. Light mode now uses var(--link-color) (#007744) which has 4.64:1 contrast ratio on light backgrounds (WCAG AA compliant). Bright cyan (#00d9ff) reserved for dark mode only.
| .news-navigation a:focus-visible { | ||
| outline: 3px solid #00d9ff; | ||
| outline-offset: 4px; | ||
| border-radius: var(--border-radius-sm); |
There was a problem hiding this comment.
The focus outline uses #00d9ff, which may not meet the 3:1 contrast requirement for focus indicators in light mode against the page/background colors. Consider using a darker outline color in light mode (or theme variables) and overriding to bright cyan only in dark mode.
There was a problem hiding this comment.
Fixed in commit b86180d. Focus outline now uses var(--primary-color) in light mode (#006633) for better contrast, with cyan (#00d9ff) only in dark mode.
styles.css
Outdated
|
|
||
| .news-navigation p { | ||
| margin: 0.5rem 0 0 0; | ||
| color: #b0b0b0; |
There was a problem hiding this comment.
In light mode color: #b0b0b0 for the description text is likely too low-contrast on the callout’s very light background. Consider using var(--text-secondary) (or another darker token) for light mode and keep the lighter gray only for dark mode.
| color: #b0b0b0; | |
| color: var(--text-secondary); |
There was a problem hiding this comment.
Applied suggestion in commit b86180d. Description text now uses var(--text-secondary) (#4a4a4a) with 8.86:1 contrast ratio in light mode, meeting WCAG AA requirements.
|
@copilot apply changes based on the comments in this thread |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
Co-authored-by: pethers <[email protected]>
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |
| <div class="news-navigation"> | ||
| <a href="news/" aria-label="Visit News section - AI-Disrupted Political Journalism"> | ||
| <span class="news-navigation-icon">📰</span> | ||
| <span>News</span> | ||
| </a> | ||
| <p>AI-Disrupted Political Journalism powered by CIA OSINT</p> | ||
| </div> |
There was a problem hiding this comment.
This is a navigation landmark but is implemented as a plain
| <div class="news-navigation"> | |
| <a href="news/" aria-label="Visit News section - AI-Disrupted Political Journalism"> | |
| <span class="news-navigation-icon">📰</span> | |
| <span>News</span> | |
| </a> | |
| <p>AI-Disrupted Political Journalism powered by CIA OSINT</p> | |
| </div> | |
| <nav class="news-navigation" aria-label="News"> | |
| <a href="news/" aria-label="Visit News section - AI-Disrupted Political Journalism"> | |
| <span class="news-navigation-icon">📰</span> | |
| <span>News</span> | |
| </a> | |
| <p>AI-Disrupted Political Journalism powered by CIA OSINT</p> | |
| </nav> |
| <div class="news-navigation"> | ||
| <a href="news/index_sv.html" aria-label="Nyheter – AI-driven politisk journalistik"> | ||
| <span class="news-navigation-icon">📰</span> | ||
| <span>Nyheter</span> | ||
| </a> | ||
| <p>AI-driven politisk journalistik med CIA OSINT</p> | ||
| </div> |
There was a problem hiding this comment.
Same as index.html: this is a navigation landmark presented as a
aria-label (e.g., aria-label="Nyheter") to improve landmark navigation for assistive technologies.
| <div class="news-navigation"> | |
| <a href="news/index_sv.html" aria-label="Nyheter – AI-driven politisk journalistik"> | |
| <span class="news-navigation-icon">📰</span> | |
| <span>Nyheter</span> | |
| </a> | |
| <p>AI-driven politisk journalistik med CIA OSINT</p> | |
| </div> | |
| <nav class="news-navigation" aria-label="Nyheter"> | |
| <a href="news/index_sv.html" aria-label="Nyheter – AI-driven politisk journalistik"> | |
| <span class="news-navigation-icon">📰</span> | |
| <span>Nyheter</span> | |
| </a> | |
| <p>AI-driven politisk journalistik med CIA OSINT</p> | |
| </nav> |
| /* ================================================== | ||
| NEWS NAVIGATION | ||
| Cyberpunk cyan-themed callout for News section | ||
| ================================================== */ | ||
|
|
||
| .news-navigation { | ||
| background: rgba(0, 217, 255, 0.08); | ||
| border: 1px solid rgba(0, 217, 255, 0.3); | ||
| border-radius: var(--border-radius); | ||
| padding: var(--spacing-md); | ||
| margin: 0 var(--spacing-md) var(--spacing-lg) var(--spacing-md); | ||
| text-align: center; | ||
| } |
There was a problem hiding this comment.
The component hard-codes multiple hex colors for dark mode (#00d9ff, #66f3ff, #c0c0c0) while the light mode uses design tokens (var(--link-color), var(--text-secondary)). To keep theming consistent and easier to adjust, consider introducing CSS variables for these News-specific dark-mode colors (or reuse existing tokens if available) and reference the variables here. Also, the header comment says "cyan-themed" but the link color in light mode is var(--link-color); updating the comment to match the actual behavior would avoid confusion.
| background: rgba(0, 217, 255, 0.12); | ||
| border-color: rgba(0, 217, 255, 0.4); | ||
| } | ||
|
|
||
| .news-navigation a { | ||
| color: #00d9ff; | ||
| } | ||
|
|
||
| .news-navigation a:hover { | ||
| color: #66f3ff; | ||
| } | ||
|
|
||
| .news-navigation a:focus-visible { | ||
| outline-color: #00d9ff; | ||
| } | ||
|
|
||
| .news-navigation p { | ||
| color: #c0c0c0; |
There was a problem hiding this comment.
The component hard-codes multiple hex colors for dark mode (#00d9ff, #66f3ff, #c0c0c0) while the light mode uses design tokens (var(--link-color), var(--text-secondary)). To keep theming consistent and easier to adjust, consider introducing CSS variables for these News-specific dark-mode colors (or reuse existing tokens if available) and reference the variables here. Also, the header comment says "cyan-themed" but the link color in light mode is var(--link-color); updating the comment to match the actual behavior would avoid confusion.
| background: rgba(0, 217, 255, 0.12); | |
| border-color: rgba(0, 217, 255, 0.4); | |
| } | |
| .news-navigation a { | |
| color: #00d9ff; | |
| } | |
| .news-navigation a:hover { | |
| color: #66f3ff; | |
| } | |
| .news-navigation a:focus-visible { | |
| outline-color: #00d9ff; | |
| } | |
| .news-navigation p { | |
| color: #c0c0c0; | |
| /* News navigation dark-mode theme tokens */ | |
| --news-navigation-bg: rgba(0, 217, 255, 0.12); | |
| --news-navigation-border: rgba(0, 217, 255, 0.4); | |
| --news-navigation-link: #00d9ff; | |
| --news-navigation-link-hover: #66f3ff; | |
| --news-navigation-text: #c0c0c0; | |
| background: var(--news-navigation-bg); | |
| border-color: var(--news-navigation-border); | |
| } | |
| .news-navigation a { | |
| color: var(--news-navigation-link); | |
| } | |
| .news-navigation a:hover { | |
| color: var(--news-navigation-link-hover); | |
| } | |
| .news-navigation a:focus-visible { | |
| outline-color: var(--news-navigation-link); | |
| } | |
| .news-navigation p { | |
| color: var(--news-navigation-text); |
| .news-navigation a { | ||
| color: #00d9ff; | ||
| } | ||
|
|
||
| .news-navigation a:hover { | ||
| color: #66f3ff; | ||
| } |
There was a problem hiding this comment.
The component hard-codes multiple hex colors for dark mode (#00d9ff, #66f3ff, #c0c0c0) while the light mode uses design tokens (var(--link-color), var(--text-secondary)). To keep theming consistent and easier to adjust, consider introducing CSS variables for these News-specific dark-mode colors (or reuse existing tokens if available) and reference the variables here. Also, the header comment says "cyan-themed" but the link color in light mode is var(--link-color); updating the comment to match the actual behavior would avoid confusion.
| background: rgba(0, 217, 255, 0.12); | ||
| border-color: rgba(0, 217, 255, 0.4); | ||
| } | ||
|
|
||
| .news-navigation a { | ||
| color: #00d9ff; | ||
| } | ||
|
|
||
| .news-navigation a:hover { | ||
| color: #66f3ff; | ||
| } | ||
|
|
||
| .news-navigation a:focus-visible { | ||
| outline-color: #00d9ff; | ||
| } | ||
|
|
||
| .news-navigation p { | ||
| color: #c0c0c0; |
There was a problem hiding this comment.
The component hard-codes multiple hex colors for dark mode (#00d9ff, #66f3ff, #c0c0c0) while the light mode uses design tokens (var(--link-color), var(--text-secondary)). To keep theming consistent and easier to adjust, consider introducing CSS variables for these News-specific dark-mode colors (or reuse existing tokens if available) and reference the variables here. Also, the header comment says "cyan-themed" but the link color in light mode is var(--link-color); updating the comment to match the actual behavior would avoid confusion.
| background: rgba(0, 217, 255, 0.12); | |
| border-color: rgba(0, 217, 255, 0.4); | |
| } | |
| .news-navigation a { | |
| color: #00d9ff; | |
| } | |
| .news-navigation a:hover { | |
| color: #66f3ff; | |
| } | |
| .news-navigation a:focus-visible { | |
| outline-color: #00d9ff; | |
| } | |
| .news-navigation p { | |
| color: #c0c0c0; | |
| /* News navigation dark-mode color tokens */ | |
| --news-nav-link-color: #00d9ff; | |
| --news-nav-link-hover-color: #66f3ff; | |
| --news-nav-text-color: #c0c0c0; | |
| background: rgba(0, 217, 255, 0.12); | |
| border-color: rgba(0, 217, 255, 0.4); | |
| } | |
| .news-navigation a { | |
| color: var(--news-nav-link-color); | |
| } | |
| .news-navigation a:hover { | |
| color: var(--news-nav-link-hover-color); | |
| } | |
| .news-navigation a:focus-visible { | |
| outline-color: var(--news-nav-link-color); | |
| } | |
| .news-navigation p { | |
| color: var(--news-nav-text-color); |
|
@copilot apply changes based on the comments in this thread |
🔍 Lighthouse Performance Audit
📥 Download full Lighthouse report Budget Compliance: Performance budgets enforced via |





Implementation Plan: Add News Section Navigation Link
Objective
Add News section navigation link to index.html and index_sv.html to establish foundation for AI-disrupted political journalism covering Riksdag, Regeringen, and government agencies.
Minimal Changes Checklist
Step 1: Add News link to index.html
news/directoryStep 2: Add News link to index_sv.html
news/index_sv.html(localized)Step 3: Code Review Feedback - Move to CSS classes
.news-navigationstyles in styles.css (lines 3186-3246)@media (prefers-color-scheme: dark)Step 4: WCAG 2.1 AA Accessibility Fixes
var(--link-color)(#007744 - WCAG AA compliant)var(--text-secondary)(#4a4a4a - 8.86:1 contrast)var(--primary-color)for better contrastnews/index_sv.htmlfor language consistencyStep 5: Validation
Step 6: Final verification
Screenshots
Desktop EN (WCAG AA Compliant)

Desktop SV (WCAG AA Compliant)

Mobile Responsive (375px)

Implementation Details
CSS Architecture (styles.css lines 3200-3252)
HTML Structure (Swedish - Localized)
Accessibility Improvements:
news/index_sv.htmlTesting Results
✅ Link functionality: EN navigates to
/news/, SV navigates to/news/index_sv.html✅ Responsive design: Works on 320px-1440px+ screen widths
✅ Accessibility: WCAG 2.1 AA compliant (contrast, labels, focus indicators)
✅ Visual consistency: Matches existing cyberpunk theme (green in light, cyan in dark)
✅ Multi-language: Proper localization with language-specific links
✅ CSS Architecture: Clean separation, uses design tokens, dark mode support
Code Review Responses
All 5 review comments addressed:
news/index_sv.htmlfor language consistencyvar(--link-color)for AA contrast (4.64:1)var(--primary-color)for AA contrastvar(--text-secondary)for AA contrast (8.86:1)Ready for Review
All acceptance criteria met including all code review feedback. WCAG 2.1 AA accessibility verified with proper contrast ratios and label accessibility.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.