You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For tech docs which do not use the multi-page nav, the table of contents are confusing.
The table of contents as generated by the Middleman extension has two items, 'Search', and 'Results'.
However only one of these headings is visible at any one time.
I think having both links visible at the same time is a bit of a strange one. When there are no results, the Results link takes you nowhere, and when there are results, the Search link takes you nowhere. Or rather, it takes you to #how-to-search, but this is within a
that has aria-hidden on it, so presumably the anchor won't resolve for assistive tech users in these cases.
- #263 (review)
Fixing this is a little tricky because of the way the table of contents is generated and inserted:
Ah, this is going to be harder than I thought... the naive way to have an empty sidebar navigation is to override the sidebar content in the core erb template, however for mobile devices this either leaves a table of contents button that does nothing, or omits the search box entirely.
So making this change the proper way would involve massively rewriting the core template, which will take time and be risky. I guess the hacky way to do it would be to do it with JavaScript; this will be slightly easier, but not so great maintenance wise.
... Also, I'm not sure how with JavaScript we could detect whether the page is using a multipage nav or not.
- #263 (comment).
The text was updated successfully, but these errors were encountered:
I've done a bit of digging into this following a conversation with @lfdebrux, and I wonder if the simplest and most user-focused solution is to disable search for docs that do not use multipage_nav.
If you set multipage_nav to false, only one page of content is ever displayed (source/index.html.md.erb). So it doesn't seem to make sense to have full search functionality - there's no apparent user need to search a single page (because you can do that with Ctrl+F), and the structure of the results page would be a bit weird and unhelpful.
For tech docs which do not use the multi-page nav, the table of contents are confusing.
The table of contents as generated by the Middleman extension has two items, 'Search', and 'Results'.
However only one of these headings is visible at any one time.
Fixing this is a little tricky because of the way the table of contents is generated and inserted:
The text was updated successfully, but these errors were encountered: