MediaWiki:Gadget-bhc-accessibility.css
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/*
⚠️ Do not reorder rules below this line — contrast overrides depend on cascade order.
*/
/* =========================================================
BHC Accessibility Gadget – MediaWiki / Timeless
========================================================= */
/* ---------------------------------------------------------
Variables
--------------------------------------------------------- */
:root{
--a11y-bg: #111827;
--a11y-border: #374151;
--a11y-fg: #ffffff;
--a11y-focus: #FFBF47;
--a11y-link-underline: #36C; /* MediaWiki link blue */
--a11y-menu-width: 340px;
}
/* Timeless: stop skin CSS shrinking the accessibility icon */
body.skin-timeless .a11y-toggle{
font-size: 16px !important;
line-height: 1 !important;
}
body.skin-timeless .a11y-toggle svg{
display: block !important;
width: 36px !important;
height: 36px !important;
min-width: 36px !important;
min-height: 36px !important;
max-width: none !important;
max-height: none !important;
/* If the glyph still looks small, keep this: */
transform: scale(1.15) !important;
transform-origin: 50% 50% !important;
}
/* Make sure fill isn’t being altered by skin rules */
body.skin-timeless .a11y-toggle svg path{
fill: currentColor !important;
}
/* ---------------------------------------------------------
Skip links (appear when focused)
--------------------------------------------------------- */
.skip-link{
position: absolute;
left: 12px;
top: 12px;
z-index: 11000;
padding: 10px 14px;
border-radius: 8px;
background: #111827;
color: #fff;
text-decoration: none;
transform: translateY(-150%);
transition: transform 0.15s ease;
border: 2px solid var(--a11y-focus);
}
.skip-link:focus,
.skip-link:focus-visible{
transform: translateY(0);
outline: none;
}
body.a11y-contrast .skip-link{
background: #000 !important;
color: #FFD400 !important;
border-color: #FFD400 !important;
}
/* ---------------------------------------------------------
Floating accessibility toggle
--------------------------------------------------------- */
.a11y-toggle{
position: fixed;
right: 16px;
bottom: 16px;
z-index: 10001;
width: 56px;
height: 56px;
border-radius: 50%;
background: #005FCC;
border: 2px solid #ffffff;
color: #ffffff;
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: 0 10px 24px rgba(0,0,0,0.25);
cursor: pointer;
}
.a11y-toggle:hover{ background:#0047A6; }
.a11y-toggle:focus-visible{
outline: 3px solid var(--a11y-focus);
outline-offset: 3px;
}
.a11y-toggle svg{
width: 44px;
height: 44px;
fill: currentColor;
}
/* ---------------------------------------------------------
Panel
--------------------------------------------------------- */
.a11y-panel{
position: fixed;
right: 14px;
bottom: 76px;
z-index: 10000;
width: var(--a11y-menu-width);
max-width: calc(100vw - 28px);
background: var(--a11y-bg);
border: 1px solid var(--a11y-border);
color: var(--a11y-fg);
border-radius: 16px;
padding: 12px;
box-shadow: 0 14px 40px rgba(0,0,0,0.28);
}
.a11y-panel[hidden]{ display:none !important; }
/* Header */
.a11y-head{
display:flex;
align-items:center;
justify-content: space-between;
margin-bottom: 10px;
}
.a11y-head h2{
font-size: 16px;
margin: 0;
}
.a11y-help{
width: 28px;
height: 28px;
border-radius: 50%;
background: #fff;
color: #111827;
font-weight: 900;
text-decoration: none;
display:flex
