CSS: Change parent on focus of child
You can now do this in pure CSS, so no JavaScript needed 😁 The new CSS pseudo-class :focus-within would help for cases like this and will help with accessibility when people use tabbing for navigating, common when using screen readers. .parent:focus-within { border: 1px solid #000; } The :focus-within pseudo-class matches elements that either themselves … Read more