{"id":334279,"date":"2021-02-12T12:03:56","date_gmt":"2021-02-12T20:03:56","guid":{"rendered":"https:\/\/css-tricks.com\/?p=334279"},"modified":"2021-02-12T12:03:59","modified_gmt":"2021-02-12T20:03:59","slug":"dont-put-pointer-events-none-on-form-labels","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/dont-put-pointer-events-none-on-form-labels\/","title":{"rendered":"Don\u2019t put pointer-events: none on form labels"},"content":{"rendered":"\n

Bruce Lawson with the tip of the day, warning against the use of pointer-events: none<\/code> on forms labels. We know that pointer-events<\/code> is used to change how elements respond to click, tap, hover, and active states. But it apparently borks form labels, squashing their active hit target size to something small and tough to interact with. Bruce includes examples in his post.<\/p>\n\n\n\n

That’s not the striking part of the post though. It’s that the issue was pinned to an implementation of Material Design’s floating labels component<\/a>. Bruce fortunately had pointer events expert Patrick Lauke’s ear, who pointed<\/em> (get it?) out the issue.<\/p>\n\n\n\n

aha, now i remember when i first saw a few weeks ago – testing something based on material design for web https:\/\/t.co\/YkEKXkU0To<\/a> pic.twitter.com\/31S74X1i4R<\/a><\/p>\u2014 patrick h. lauke #toryScum #clapForFlagWankers (@patrick_h_lauke) February 5, 2021<\/a><\/blockquote>