Login
You're viewing the code4lib.social public feed.
  • Nov 23, 2026, 5:32 PM

    This morning I started by trying to navigate around the site by keyboard.

    It works, but sometimes the outline that shows you which element is focused, doesn't appear. So I at first thought the element wasn't getting focused.

    Turns out that "overflow: hidden;" on the nav element <li> tags (which contain the anchors being focused) were causing the outline to be hidden. Element focus outlines are 'overflowing' the containing element!

    Fixed. ✅

    #CSS #HTML #WebDev #accessibility #A11y

    💬 2🔄 0⭐ 0

Replies

  • Nov 23, 2026, 5:39 PM

    Next I noticed that a pagination element that you can keyboard nav to and press enter to load the next page of results... because it loads a whole new page... your keyboard nav resets to the top of the page.

    That's a lot of tabbing to get to the new list of results. So I added an anchor id to the top of the results and have the page load the visitor focused there instead. Ie, adding `#new-results` to the end of the pagination URLs.

    #HTML #CSS #A11y #accessibility

    💬 0🔄 0⭐ 0
  • Nov 23, 2026, 5:45 PM

    @syntaxseed Oh, that one's sneaky. I've hit the same thing with overflow hidden on nav items. A negative outline-offset kept the focus ring inside the box for me, so I didn't have to touch the layout.

    💬 0🔄 0⭐ 0