-
Notifications
You must be signed in to change notification settings - Fork 297
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
Removing the Ctrl
+ K
labels from the search box?
#1499
Comments
a custom CSS rule should make this rather simple; probably this (untested) .search-button-field > .search-button__kbd-shortcut {
display: none;
} |
Thank you, that helped! I think it would be helpful to not show this keyboard shortcut by default in the pydata theme, and just show the word "search" instead (since I suspect this change is made to make it more discoverable than just having the icon). Particularly since the shortcut already shows up when clicking the search box. Some screenshots in this PR vega/altair#3220 of what that looks like. |
Helpful in what sense? Is the presence of the keyboard shortcuts actually causing problems, or just doesn't align with your aesthetic preference? Note that you also have the option of using the old "icon-only" search indicator; it will still pop up the same search overlay input box. https://pydata-sphinx-theme.readthedocs.io/en/latest/user_guide/search.html This is done by changing html_theme_options = {
...
"navbar_end" = ["search-button.html", ...],
} |
Thanks for showing how to include the icon only in the search! I didn't know that was possible.
Sorry for not being clearer. With "helpful" I was referring to the "helpful for the visitor's navigation experience". I believe that displaying too many objects that call for a visitor's attention when they arrive at a page can be distracting, and that it could be helpful for the navigation experience to include less attention-calling elements. While my personal aesthetic preferences would probably be to just have the icon, I believe that having the text "search" is helpful for visitors to quickly find a commonly used option on the page for the first time. This is in contrast to the keyboard shortcut which does not serve a purpose in discovering the search field for the first time and is clearly visible when the search box is used so that it can be learned for future uses. To be clear, I'm sharing what I think/believe would be helpful for someone navigating a documentation page, not something I know for certain to be true. |
@trallard @gabalafou @smeragoel @12rambau any opinions here? Is just "search" better than "search (Ctrl+k)" for the field-like button, assuming we retain the keyboard shortcut hint in the overlay input box? |
The |
small addition to my last comment: this is in fact a mirror of docausorus behavior which is a major source of inspiration of this theme (https://shields.io/) Ion second though I simply don't know what to do. |
I understand the point of visual noise, but it is a good idea to keep the text prompt visible. It is a valuable accessibility feature for users who rely on keyboard shortcuts, and especially useful for new users. If it seems too visually distracting, I can try reducing the size of the text prompt or making it less visually prominent. |
My two cents:
My reasoning:
|
It seems we have basically 2 points of view here:
I've provided a three-line CSS fix for this issue in my initial response #1499 (comment) and IMO that is enough; users can hide the shortcut if they want, and I'm not seeing a compelling enough argument to hide it for everyone's sites. Yes, we could tweak size/contrast to maybe find a middle ground, but I agree with @gabalafou that this is not a high priority accessibility fix. re: @gabalafou's dvorak problems: that is super weird, please open a separate issue about it. |
Is it possible to remove the
Ctrl
+K
labels from the search box and just leave the text "Search"? It is nice to have this shortcut available, but I think it adds visual noise and it is not something that needs to displayed on the landing page of our docs. It is helpful and sufficient for me that it is displayed in the overlay search bar once a search is made.The text was updated successfully, but these errors were encountered: