Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make autocomplete text invisible in search bar #1171

Closed
hackartisan opened this issue Sep 27, 2022 · 1 comment · Fixed by #1187
Closed

Make autocomplete text invisible in search bar #1171

hackartisan opened this issue Sep 27, 2022 · 1 comment · Fixed by #1187

Comments

@hackartisan
Copy link
Member

Set the opacity to 0. See this blacklight commit for guidance: https://github.com/projectblacklight/blacklight/pull/2807/files

child of #1165

@hackartisan
Copy link
Member Author

The CSS ways of doing this had undesirable accessibility side effects. Either we could hide the autocompleted text visually but not from screen readers, or we could effectively hide it but it also hid the search bar from screen readers.

It looks like there's a hint option on the typeahead initialization that is set to "true" in blacklight. It seems worth trying to override that initialization and set it to false instead.

https://github.com/twitter/typeahead.js/blob/master/doc/jquery_typeahead.md

I would try copying most of https://github.com/projectblacklight/blacklight/blob/v7.29.0/app/javascript/blacklight/autocomplete.js into pulfalight_loader.es6 to see if we can initialize it with the hint off.

Also, an interesting note, blacklight has removed twitter typeahead for version 8: projectblacklight/blacklight#2576

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants