Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent input suggestion on MS Edge

Microsoft Edge is displaying an annoying pop-out with the text "results from saved info" when I start typing something (e.g. 'te') into the input. I want to hide this (for all users) so I have set autocomplete=off but I still see this annoying box. I've also tried list="autocompleteOff" and disabling all extensions with no success.

enter image description here

Sandbox reproduction: https://codesandbox.io/s/hungry-golick-2fnlnt?file=/index.html

<input id="input-guess" 
                    type="text"
                    bind:value={guess} 
                    spellcheck="true" 
                    placeholder={$t('common.enter_a_word')}
                    autocomplete="off" 
                    list="autocompleteOff" />
like image 763
Keyo Avatar asked Oct 31 '25 13:10

Keyo


1 Answers

I was able to reproduce this issue on a custom autocomplete control, and fix it by adding aria-autocomplete="both" aria-haspopup="false" to my input field:

You can keep your field ID, and other attributes autocomplete="off" spellcheck="false"

<input id="form-input-id" type="text" class="form-control" placeholder="Start typing" autocomplete="off" spellcheck="false" aria-autocomplete="both" aria-haspopup="false">

References:

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-autocomplete

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup

like image 192
Slackarse Avatar answered Nov 03 '25 03:11

Slackarse



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!