diff --git a/sec_certs_page/static/base.css b/sec_certs_page/static/base.css index 50a2a7819..fc238257f 100644 --- a/sec_certs_page/static/base.css +++ b/sec_certs_page/static/base.css @@ -2,6 +2,22 @@ --sidebar-width: 250px; } +/* Skip to main content link - accessible but visually hidden until focused */ +.skip-link { + position: absolute; + top: -40px; + left: 0; + background: #000; + color: white; + padding: 8px; + text-decoration: none; + z-index: 100; +} + +.skip-link:focus { + top: 0; +} + .nav-button { margin-right: 0.5rem !important; margin-left: 0.5rem !important; @@ -94,7 +110,7 @@ .chat-message-user { text-align: right; background: #d1e7dd; - color: #0f5132; + color: #003d1a; border-radius: 1em 1em 0 1em; margin: 0.5em 0 0.5em auto; max-width: 75%; @@ -104,7 +120,7 @@ .chat-message-assistant { text-align: left; background: #d1dce7; - color: #0f3051; + color: #001529; border-radius: 1em 1em 1em 0; margin: 0.5em auto 0.5em 0; max-width: 75%; @@ -361,7 +377,6 @@ h6 { .dropdown .dropbtn { font-size: 16px; border: none; - outline: none; color: white; padding: 14px 16px; background-color: inherit; @@ -369,6 +384,11 @@ h6 { margin: 0; /* Important for vertical align on mobile phones */ } +.dropdown .dropbtn:focus-visible { + outline: 3px solid #ffc107; + outline-offset: 2px; +} + #left-navigation { position: fixed; left: 0px; @@ -1027,3 +1047,149 @@ h6 { color: white; } +/* ========================================================================== + WCAG Accessibility implementation + btn-outline-primary color overrides per theme + ========================================================================== */ + +[data-bs-theme="light"] .btn-outline-primary { + --bs-btn-color: #0060F0; + --bs-btn-border-color: #0060F0; + --bs-btn-hover-bg: #0060F0; + --bs-btn-hover-border-color: #0060F0; + --bs-btn-active-bg: #0060F0; + --bs-btn-active-border-color: #0060F0; +} + +[data-bs-theme="light"] .btn-link { + --bs-btn-color: #0060F0; + --bs-btn-hover-color: #0056B3; + --bs-btn-active-color: #0056B3; +} + +[data-bs-theme="dark"] .btn-outline-primary { + --bs-btn-color: #85B6FF; + --bs-btn-border-color: #85B6FF; + --bs-btn-hover-bg: #85B6FF; + --bs-btn-hover-border-color: #85B6FF; + --bs-btn-active-bg: #85B6FF; + --bs-btn-active-border-color: #85B6FF; +} + +/* btn-outline-secondary:*/ +[data-bs-theme="dark"] .btn-outline-secondary { + --bs-btn-color: #AAAAAA; + --bs-btn-border-color: #AAAAAA; + --bs-btn-hover-color: #212529; + --bs-btn-hover-bg: #AAAAAA; + --bs-btn-hover-border-color: #AAAAAA; + --bs-btn-active-color: #212529; + --bs-btn-active-bg: #AAAAAA; + --bs-btn-active-border-color: #AAAAAA; +} + +/* Higher contrast for links (Light mode) */ +[data-bs-theme="light"] p a { + color: #1A6BCC; +} + +[data-bs-theme="light"] p a:hover, +[data-bs-theme="light"] p a:focus { + color: #0056B3; +} + +/* back to original color in dark mode*/ +[data-bs-theme="dark"] p a { + color: #85B6FF; +} + +/* Higher contrast links on .bg-darker-light background*/ +[data-bs-theme="dark"] .bg-darker-light a:not(.btn) { + color: #9EC5FE; +} +[data-bs-theme="dark"] .bg-darker-light .btn-link { + --bs-btn-color: #9EC5FE; + --bs-btn-hover-color: #cfe2ff; + --bs-btn-active-color: #cfe2ff; +} + +[data-bs-theme="light"] .bg-darker-light a:not(.btn) { + color: #1A6BCC; +} +[data-bs-theme="light"] .bg-darker-light .btn-link { + --bs-btn-color: #1A6BCC; + --bs-btn-hover-color: #0056B3; + --bs-btn-active-color: #0056B3; +} + +/* ========================================================================== + Status label colors per theme + ========================================================================== */ + +/* Light mode */ +[data-bs-theme="light"] .status-active { + color: #177D4D; +} +[data-bs-theme="light"] .status-archived{ + color: #8B6313; +} +[data-bs-theme="light"] .status-historical { + color: #876608; +} +[data-bs-theme="light"] .status-revoked { + color: #dc3545; +} + +/* Dark mode */ +[data-bs-theme="dark"] .status-active { + color: #57C78B; +} +[data-bs-theme="dark"] .status-archived, +[data-bs-theme="dark"] .status-historical { + color: #ffcd39; +} +[data-bs-theme="dark"] .status-revoked { + color: #ea868f; +} + +/* EUCC assurance levels */ +[data-bs-theme="light"] .eucc-assurance-high { + color: #177D4D; +} +[data-bs-theme="dark"] .eucc-assurance-high { + color: #57C78B; +} +[data-bs-theme="light"] .eucc-assurance-substantial { + color: #946300; +} +[data-bs-theme="dark"] .eucc-assurance-substantial { + color: #FFCA2C; +} + +/* ========================================================================== + Alert link colors per theme + ========================================================================== */ + +[data-bs-theme="light"] .alert-primary a, +[data-bs-theme="light"] .alert-info a, +[data-bs-theme="light"] .bg-darker-light .alert-primary a, +[data-bs-theme="light"] .bg-darker-light .alert-info a { + color: #0158E4; +} + +[data-bs-theme="light"] .alert-warning a { + color: #6B4800; +} + +[data-bs-theme="dark"] .alert-info a, +[data-bs-theme="dark"] .bg-darker-light .alert-info a { + color: #9EC5FE; +} + +/*File metadata collapsible button — visible focus ring*/ + +.metadata-container > button:focus-visible { + outline: 3px solid var(--bs-focus-ring-color, #86b7fe); + outline-offset: 2px; + border-radius: 0.25rem; +} \ No newline at end of file diff --git a/sec_certs_page/static/network.js b/sec_certs_page/static/network.js index f09027c4e..bb56b4d54 100644 --- a/sec_certs_page/static/network.js +++ b/sec_certs_page/static/network.js @@ -176,7 +176,8 @@ class CertificateNetwork { .text("Status"); const statusFilter = statusBox.append("select") - .attr("name", "status"); + .attr("name", "status") + .attr("aria-label", "Filter by status"); for (let status in this.statuses) { statusFilter.append("option") diff --git a/sec_certs_page/templates/cc/entry/index.html.jinja2 b/sec_certs_page/templates/cc/entry/index.html.jinja2 index a725cc5ae..71a9206d9 100644 --- a/sec_certs_page/templates/cc/entry/index.html.jinja2 +++ b/sec_certs_page/templates/cc/entry/index.html.jinja2 @@ -356,7 +356,7 @@
Found a bug in the tool?
@@ -22,7 +31,4 @@ Email us!Browse through CVEs and see which certificates they impact.
Browse through CPEs and see which certificates they match.