1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-12 06:15:45 +02:00

Improve guide for small width screens and screen readers

This commit is contained in:
chylex 2017-09-25 21:12:47 +02:00
parent 2e24cb634c
commit e9ec27169c
2 changed files with 9 additions and 0 deletions
Resources/Guide

View File

@ -10,11 +10,13 @@ document.addEventListener("DOMContentLoaded", function(){
if (parent.hasAttribute("open")){
parent.removeAttribute("open");
summary.setAttribute("aria-expanded", "false");
contents.setAttribute("aria-hidden", "true");
contents.style.display = "none";
}
else{
parent.setAttribute("open", "");
summary.setAttribute("aria-expanded", "true");
contents.setAttribute("aria-hidden", "false");
contents.style.display = "block";
}
};
@ -41,6 +43,7 @@ document.addEventListener("DOMContentLoaded", function(){
summary.addEventListener("click", onClick);
summary.addEventListener("keydown", onKey);
contents.setAttribute("aria-hidden", "true");
contents.style.display = "none";
}
}

View File

@ -23,6 +23,12 @@ body {
flex-direction: column;
}
@media(max-width: 408px) {
#guide section {
min-width: calc(100vw - 48px);
}
}
#guide h2 {
margin: 20px 0 10px;
font-size: 32px;