Add Unicode icon fallback for a11y, fix duplicate label color
- Add wheelchair symbol fallback when FA7 glyph fails to render - Fix duplicate #mokoThemeFab .label rule missing color: #fff Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -17389,6 +17389,7 @@ button#mokoThemeSwitch {
|
|||||||
#mokoThemeFab .label {
|
#mokoThemeFab .label {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
font-size: .875rem;
|
font-size: .875rem;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mokoThemeFab.debug-outline {
|
#mokoThemeFab.debug-outline {
|
||||||
|
|||||||
@@ -292,7 +292,17 @@
|
|||||||
toggle.className = "a11y-toggle";
|
toggle.className = "a11y-toggle";
|
||||||
toggle.setAttribute("aria-label", "Accessibility options");
|
toggle.setAttribute("aria-label", "Accessibility options");
|
||||||
toggle.setAttribute("aria-expanded", "false");
|
toggle.setAttribute("aria-expanded", "false");
|
||||||
toggle.appendChild(faIcon("fa-solid fa-universal-access"));
|
var a11yIcon = faIcon("fa-solid fa-universal-access");
|
||||||
|
// Unicode fallback if FA7 glyph doesn't render (e.g. FA6/FA7 conflict)
|
||||||
|
setTimeout(function () {
|
||||||
|
var cs = win.getComputedStyle(a11yIcon, "::before");
|
||||||
|
if (!cs.content || cs.content === "none" || cs.content === '""' || cs.content === '"" / ""') {
|
||||||
|
a11yIcon.className = "";
|
||||||
|
a11yIcon.textContent = "\u267F";
|
||||||
|
a11yIcon.style.fontSize = "1.1rem";
|
||||||
|
}
|
||||||
|
}, 500);
|
||||||
|
toggle.appendChild(a11yIcon);
|
||||||
|
|
||||||
// Panel
|
// Panel
|
||||||
var panel = doc.createElement("div");
|
var panel = doc.createElement("div");
|
||||||
|
|||||||
Reference in New Issue
Block a user