Skip to content

Allow renaming of the header dropdown #1386

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

Closed
AlenkaF opened this issue Jul 11, 2023 · 7 comments · Fixed by #1423
Closed

Allow renaming of the header dropdown #1386

AlenkaF opened this issue Jul 11, 2023 · 7 comments · Fixed by #1423
Labels
needs: discussion Needs discussion before an implementation can be made tag: component Issues or improvements associated with a given component in the theme

Comments

@AlenkaF
Copy link
Contributor

AlenkaF commented Jul 11, 2023

Currently the header dropdown generated after n_links_before_dropdown is by default named More. It would be a nice feature if one could group remaining header links into a dropdown with a custom name.

One option I see is that generate_header_nav_html could accept an argument to use when wrapping the final few header items in a "More" dropdown:

# Wrap the final few header items in a "more" dropdown
links_dropdown = links_html[n_links_before_dropdown:]
if links_dropdown:
links_dropdown_html = "\n".join(links_dropdown)
out += f"""
<div class="nav-item dropdown">
<button class="btn dropdown-toggle nav-item" type="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
More
</button>
<div class="dropdown-menu">
{links_dropdown_html}
</div>
</div>

Maybe related to #1016

@trallard trallard added needs: discussion Needs discussion before an implementation can be made tag: component Issues or improvements associated with a given component in the theme labels Jul 12, 2023
@trallard
Copy link
Collaborator

trallard commented Jul 12, 2023

Thanks for raising this @AlenkaF - I think this would be a good enhancement.

Additionally, come to think about it, from an accessibility POV using only the word "More" as the default label/title is not descriptive enough (I'd place it under the understandable category of WCAG POUR. This is somewhat related but not the same as WCAG SC 2.4.4: Link Purpose (In Context), so the default could be improved by adopting something like More sections or similar

@12rambau
Copy link
Collaborator

@trallard the issue I see with "More sections" is the real estate it takes in the header navbar compared to "More", In many cases people will be forced to decrease the number of displayed link by 1 to maintain readability on medium screens.

@drammock
Copy link
Collaborator

I'm not opposed to allowing users to customize the dropdown name. The suggestion of "more sections" seems like it's not appropriate for our specific site, since what we put in there are external links (not sections). Also not sure what a better default would be since we don't know (without some research / surveying at least) whether most projects include external links or just sections. But maybe we can brainstorm something generic enough to encompass both sections and external links?

@trallard
Copy link
Collaborator

You are right @drammock - it would be ideal to have a good picture of what folks are using the dropdown for (I chose "More sections" as a proxy, but admittedly this might only fit my mental model of what I'd use it for).

At least allowing folks to customise the dropdown name would help mitigate this on their end and better reflect their use cases and content.

@trallard
Copy link
Collaborator

@trallard, the issue I see with "More sections" is the real estate it takes in the header navbar compared to "More"

Apologies for skipping your comment @12rambau 🙇🏽
Agree this would certainly be a tradeoff (space vs better context/accessibility). You know I would lean on saying the latter is a higher priority but I acknowledge this would impact the user experience (docs writers mainly) so caution here would be needed.

@AlenkaF
Copy link
Contributor Author

AlenkaF commented Aug 23, 2023

Thank you all for showing interest in the issue! I will go ahead and try to submit a PR with the proposal for the configurable header dropdown button name in the coming days.

Regarding the default name of the button - maybe this would deserve a separate issue?

@drammock
Copy link
Collaborator

I will go ahead and try to submit a PR with the proposal for the configurable header dropdown button name in the coming days.

Awesome, thanks!

Regarding the default name of the button - maybe this would deserve a separate issue?

I think leave it as "more" for now and we'll revisit if someone comes up with a popular alternative

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: discussion Needs discussion before an implementation can be made tag: component Issues or improvements associated with a given component in the theme
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants