Skip to content

Instantly share code, notes, and snippets.

@KrofDrakula
Last active February 24, 2022 09:54
Show Gist options
  • Save KrofDrakula/29a3d237f687bc1c0173e8e66e165640 to your computer and use it in GitHub Desktop.
Save KrofDrakula/29a3d237f687bc1c0173e8e66e165640 to your computer and use it in GitHub Desktop.
Disabling autofill with standard and vendor workarounds

Strategies for disabling autofill prompts in browsers

This document gathers possible mitigation strategies when dealing with browser or extension provided autofill suggestions that impact usability of a given website's UI and UX.

You should apply the least amount of workaround you can get away with, since it could affect the accessibility of your website when taken too far. Always verify your application with your intended audience in mind.

Disabling autofill with standard HTML attributes

Vendor-specific overrides

Obfuscating properties to thwart browser and extension heuristics

🚨 WARNING: this method will impact accessibility for screen readers and other access methods, and copy/pasting this text can result in corrupted text in some apps. Use as a last resort.

  • split a string by Unicode code points with surrogates (if not done right, it breaks emojis and compound characters) and join with \200b (​) on name, placeholder, title attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment