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;
--a11y-menu-width: 340px;
}
/* =========================================================
Skip links
========================================================= */
.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 .15s ease;
border:2px solid var(--a11y-focus);
}
.skip-link:focus-visible{ transform:translateY(0); }
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;
width:56px;
height:56px;
border-radius:50%;
background:#005FCC;
border:2px solid #fff;
color:#fff;
display:inline-flex;
align-items:center;
justify-content:center;
box-shadow:0 10px 24px rgba(0,0,0,.25);
cursor:pointer;
z-index:10001;
}
.a11y-toggle:focus-visible{
outline:3px solid var(--a11y-focus);
outline-offset:3px;
}
.a11y-toggle svg{
width:44px;
height:44px;
fill:currentColor;
}
/* =========================================================
Accessibility panel
========================================================= */
.a11y-panel{
position:fixed;
right:14px;
bottom:76px;
width:var(--a11y-menu-width);
max-width:calc(100vw - 28px);
background:var(--a11y-bg);
color:var(--a11y-fg);
border:1px solid var(--a11y-border);
border-radius:16px;
padding:12px;
box-shadow:0 14px 40px rgba(0,0,0,.28);
z-index:10000;
}
.a11y-panel[hidden]{ display:none!important; }
/* =========================================================
High contrast base
========================================================= */
body.a11y-contrast{
background:#000!important;
color:#FFD400!important;
--a11y-bg:#000;
--a11y-border:rgba(255,212,0,.7);
--a11y-fg:#FFD400;
--a11y-focus:#FFD400;
}
/* Links */
body.a11y-contrast a,
body.a11y-contrast a:visited{
color:#FFD400!important;
}
/* =========================================================
Timeless: core containers
========================================================= */
body.a11y-contrast.skin-timeless #mw-header-container,
body.a11y-contrast.skin-timeless #mw-content-container,
body.a11y-contrast.skin-timeless #mw-wrapper,
body.a11y-contrast.skin-timeless #mw-content,
body.a11y-contrast.skin-timeless .mw-body,
body.a11y-contrast.skin-timeless .mw-parser-output{
background:#000!important;
background-image:none!important;
color:#FFD400!important;
}
/* mw-content border */
body.a11y-contrast #mw-content{
border-color:#FFD400!important;
}
/* =========================================================
Timeless: search input
========================================================= */
body.a11y-contrast.skin-timeless #p-search input[type="search"],
body.a11y-contrast.skin-timeless #p-search #searchInput{
background:#000!important;
color:#FFD400!important;
caret-color:#FFD400!important;
border:2px solid #FFD400!important;
-webkit-text-fill-color:#FFD400!important;
}
/* =========================================================
Timeless: personal tools
========================================================= */
body.a11y-contrast.skin-timeless #personal,
body.a11y-contrast.skin-timeless #personal *{
background:#000!important;
color:#FFD400!important;
}
/* =========================================================
Sidebar chunk ≥1340px
========================================================= */
@media screen and (min-width:1340px){
body.a11y-contrast.skin-timeless
#mw-related-navigation .sidebar-chunk{
background:#000!important;
border-color:rgba(255,212,0,.85)!important;
box-shadow:none!important;
}
}
/* =========================================================
Edit textarea
========================================================= */
body.a11y-contrast #wpTextbox1,
body.a11y-contrast textarea.mw-editfont-monospace{
background:#000!important;
color:#FFD400!important;
caret-color:#FFD400!important;
border:2px solid #FFD400!important;
-webkit-text-fill-color:#FFD400!important;
}
/* =========================================================
EditOptions bar
========================================================= */
body.a11y-contrast .editOptions{
background:#000!important;
color:#FFD400!important;
border-color:rgba(255,212,0,.85)!important;
}
body.a11y-contrast .editOptions button,
body.a11y-contrast .editOptions input,
body.a11y-contrast .editOptions select{
background:#000!important;
color:#FFD400!important;
border:2px solid rgba(255,212,0,.85)!important;
}
/* =========================================================
WikiEditor — SAFE styling (no icon breakage)
========================================================= */
body.a11y-contrast .wikiEditor-ui,
body.a11y-contrast .wikiEditor-ui-toolbar,
body.a11y-contrast .wikiEditor-ui-toolbar .group,
body.a11y-contrast .wikiEditor-ui-toolbar .section{
background-color:#000!important;
color:#FFD400!important;
border-color:rgba(255,212,0,.85)!important;
}
/* DO NOT touch background-image on icons */
body.a11y-contrast .wikiEditor-ui .oo-ui-iconElement-icon{
background-color:transparent!important;
}
/* =========================================================
Codex (CDX) messages
========================================================= */
body.a11y-contrast .cdx-message,
body.a11y-contrast .cdx-message--block,
body.a11y-contrast .cdx-message--error{
background:#000!important;
color:#FFD400!important;
border:2px solid rgba(255,212,0,.85)!important;
}
body.a11y-contrast .cdx-message__content,
body.a11y-contrast .cdx-message__content *{
background:transparent!important;
color:#FFD400!important;
}
body.a11y-contrast .cdx-message__icon,
body.a11y-contrast .cdx-message__icon *{
fill:#FFD400!important;
}
/* =========================================================
EMERGENCY: ensure accessibility toggle always visible
KEEP AT VERY END
========================================================= */
#a11y-toggle.a11y-toggle{
position:fixed!important;
right:16px!important;
bottom:16px!important;
display:inline-flex!important;
visibility:visible!important;
opacity:1!important;
z-index:2147483647!important;
pointer-events:auto!important;
transform:none!important;
}
#a11y-toggle.a11y-toggle svg{
display:block!important;
visibility:visible!important;
opacity:1!important;
}
