I was reading this article and I reached this gem:
const FOCUSABLE_SELECTORS = [
'[contenteditable]',
'[tabindex="0"]:not([disabled])',
'a[href]',
'audio[controls]',
'button:not([disabled])',
'iframe',
"input:not([disabled]):not([type='hidden'])",
'select:not([disabled])',
'summary',
'textarea:not([disabled])',
'video[controls]',
].join(',');
Authors should not have to do all this just to target focusable elements (not to mention even this won't catch some…). Adding a pseudo-class for focusability seems like pretty low-hanging fruit (so low-hanging that I'd swear I've seen it discussed before, but I couldn't find anything so…)
I was reading this article and I reached this gem:
Authors should not have to do all this just to target focusable elements (not to mention even this won't catch some…). Adding a pseudo-class for focusability seems like pretty low-hanging fruit (so low-hanging that I'd swear I've seen it discussed before, but I couldn't find anything so…)