Keyboard inaccessible, bad HTML. WCAG fails immediately.
-
I’m curious, why did you choose to insert the <div> element into the DOM with some JS to handle scrolling. No keyboard focus, no accessible label/name/content, no HTML semantics, no ARIA to fix this.
In fact DO NOT use ARIA to override./hide your problems. The best ARIA is no ARIA.
Use an <a> element, it’s also quick to write and has it all by definition. You can easily add span inside the link element with translatable content and hide it visually with “sr-only” class (from Bootstrap). You could detect the first link on the page and make it an anchor if there’s no id attribute.
- The topic ‘Keyboard inaccessible, bad HTML. WCAG fails immediately.’ is closed to new replies.