DEV Community


Discussion on: Checklist: 56 guiding questions about web accessibility

sylwiavargas profile image
Sylwia Vargas Author

WOW! Please share the link (to the website and/or github) if you can! I'm so curious! All this sounds great.

Thread Thread
ghost profile image

It's not up yet, but is nothing fancy, just something like:

    <label for="someid">visible text or button</label>
    <input id="someid" class="hidden" type="checkbox">
            <li>some item of the menu</li>
  • I'm conflicted if those divs should be aside.
.hidden {
    display: none;
    visibility: hidden;

#the-menu { display: none; }
#someid:checked ~ #the-menu { display: block; }

The idea is to take advantage of the :checked and the ~ in css

About the tables, is similar but using the column table element to toggle visibility: collapse

Besides adding a hidden I think it doesn't muddy the html or css much, if you are hidding a lot of columns you can get something not that pretty like:


    <label for="togglebtn1">Razón social</label>
    <label for="togglebtn2">Tipo</label>
    <label for="togglebtn3">Rut</label>
    <label for="togglebtn4">Rubro</label>
    <label for="togglebtn5">Url</label>
    <label for="togglebtn6">Horario</label>
    <label for="togglebtn7">Comentario</label>
    <label for="togglebtn8">Estado</label>
    <label for="togglebtn9">Acciones</label>

        <input class="hidden" id="togglebtn1" type="checkbox">
        <input class="hidden" id="togglebtn2" type="checkbox">
        <input class="hidden" id="togglebtn3" type="checkbox">
        <input class="hidden" id="togglebtn4" type="checkbox">
        <input class="hidden" id="togglebtn5" type="checkbox">
        <input class="hidden" id="togglebtn6" type="checkbox">
        <input class="hidden" id="togglebtn7" type="checkbox">
        <input class="hidden" id="togglebtn8" type="checkbox">
        <input class="hidden" id="togglebtn9" type="checkbox">

                <col span="2">
                <col class="toggle1">
                <col class="toggle2">
                <col class="toggle3">
                <col class="toggle4">
                <col class="toggle5">
                <col class="toggle6">
                <col class="toggle7">
                <col class="toggle8">
                <col class="toggle9">


But all in all, I avoided JS, works fast, doesn't add much html or css and is just a visual aid, shouldn't mess with screen readers or other devices, even without css the result is readable enough. I hope it helps.

Thread Thread
sylwiavargas profile image
Sylwia Vargas Author

WOW I love this so much! What a great resource. This is really awesome. Thank you!