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

fix(sidebar): improve accessibility of sidebar bottom menu #925

Merged
merged 3 commits into from
Mar 2, 2024
Merged

fix(sidebar): improve accessibility of sidebar bottom menu #925

merged 3 commits into from
Mar 2, 2024

Conversation

TheJiahao
Copy link
Contributor

  • Move <div class="menu-bottom-section"> outside <ol class="menu" id="main-menu"> to fix warning <li> elements must be contained in a <ul> or <ol>

  • Add title="language" to language select menu to fix error Select element must have an accessible name: Element has no title attribute

The appearance is identical after change.

Before:
before

After:
after

@ottok
Copy link

ottok commented Feb 22, 2024

(redacted)

@ottok
Copy link

ottok commented Feb 24, 2024

Note that #950 is targeting the same section of code, so once either one is merged, the other one needs to be rebased.

ottok pushed a commit to ottok/hugo-theme-stack that referenced this pull request Feb 24, 2024
@CaiJimmy CaiJimmy changed the title Improve sidebar bottom menu accessibility fix(sidebar): improve accessibility of sidebar bottom menu Mar 2, 2024
Copy link
Owner

@CaiJimmy CaiJimmy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@CaiJimmy CaiJimmy merged commit 5b0d6fd into CaiJimmy:master Mar 2, 2024
4 of 5 checks passed
@cubercsl
Copy link
Contributor

cubercsl commented Mar 6, 2024

@TheJiahao Could you confirm this change works fine in mobile size? I tried to cherry-pick this change to v4 branch, it seems that the language switcher disappeared.

@TheJiahao
Copy link
Contributor Author

@cubercsl I can confirm that the bottom menu including language and theme switch is not showing in mobile. This will be fixed in PR #966.

NapalmCodes pushed a commit to NapalmCodes/hugo-theme-stack that referenced this pull request Mar 30, 2024
* fix(sidebar): hide translations selector if only one translation available (CaiJimmy#950)

hide translations menu if only one translation available

* release: 3.22.0

* fix(sidebar): translation selector - avoid cast per PR CaiJimmy#950  (CaiJimmy#961)

avoid cast per PR CaiJimmy#950

* feat(comments): add support for Beaudar(表达)comment system (CaiJimmy#931)

https://beaudar.lipk.org/

* fix(comment): moved waline `placeholder` parameter to `locale.placeholder` (CaiJimmy#914)

fix waline parameter

* fix(sidebar): improve accessibility of sidebar bottom menu (CaiJimmy#925)

* fix(menu): <ol> containing other than <li>, <script> or <template> elements

* fix(menu): add title to language select menu

* release: 3.23.0

* fix(i18n): add missing `zh-cn` translations (CaiJimmy#964)

* feat: update Hugo version and minimum version requirement to 0.123.0 (CaiJimmy#970)

* fix: `.Site.LastChange` deprecation (CaiJimmy#968)

Fix the deprecation warning emitted from Hugo, and fix the typo in ` exampleSite/content/page/about/index.md`

* feat: bump KaTeX to latest released version `0.16.9` (CaiJimmy#969)

Bump KaTeX to latest released version 0.16.9

* fix(sidebar): menu-bottom-section not showing in mobile (CaiJimmy#966)

* fix(sidebar): Bottom section not showing in mobile

* fix(sidebar): Align bottom section to bottom

* fix(sidebar): Gap missing in bottom section

* refactor(sidebar): Simplify styles

* refactor(sidebar): Remove useless padding-left

* refactor(sidebar): Remove useless margin-top

* refactor(sidebar): Combine duplicate flex-direction

* refactor(sidebar): Remove redundant width

* release: 3.24.0

* fix(head): prevent Go template from escaping HTML entities in meta description (CaiJimmy#973)

* fix: favicon does not load if baseurl includes a subfolder (CaiJimmy#972)

Use relURL https://gohugo.io/functions/urls/relurl/

* release: 3.24.1

* fix: remove `\n` character from meta description (CaiJimmy#980)

* fix: deprecation warning for `.Site.Author` (CaiJimmy#979)

Fix deprecation warning for .Site.Author, deprecated in Hugo 0.124.0

* release 3.24.2

* fix: use page resource permalink in link image (CaiJimmy#990)

closes CaiJimmy#982

* docs: update some invalid documentation links (CaiJimmy#983)

Update some documentation links (some were dead links)

* feat(i18n): update translations for `ja` (CaiJimmy#984)

* feat(i18n): update translations for `ja`

* Apply review suggestions

* fix(i18n): wrap `footer.builtWith` with double quotes in Japanese translation (CaiJimmy#991)

* feat: add anchor link to markdown heading (CaiJimmy#992)

closes CaiJimmy#935

* fix: rename `.social-menu` to `.menu-social` to avoid being blocked by ad blockers (CaiJimmy#993)

closes CaiJimmy#924

* fix: make KaTeX render all math inside `document.body` (CaiJimmy#994)

Since it only accepts one element, I cannot pass `.article-content` and `#TableOfContent` to it. The official documentation uses `document.body` directly, so I guess that's fine.

closes CaiJimmy#882

* release: 3.25.0

* Fix to dark mode toggle

* Style fixes

* Style fixes

* Style fix

* Tweak

* Fix

* Remove hash sign

* Make sub heading text the anchor

---------

Co-authored-by: James McMurry <jmcmurry@semanticnoise.com>
Co-authored-by: Jimmy Cai <hi@jimmycai.com>
Co-authored-by: Jiarong Hong <64763790+hongjr03@users.noreply.github.com>
Co-authored-by: L-Super <40905056+L-Super@users.noreply.github.com>
Co-authored-by: Jiahao Li <42709836+TheJiahao@users.noreply.github.com>
Co-authored-by: Zeyu Huang <fhfuih@outlook.com>
Co-authored-by: Andreas Deininger <andreas@deininger.net>
Co-authored-by: Andrew Doering <delize@users.noreply.github.com>
Co-authored-by: andrewmoise <andrew.moise@gmail.com>
Co-authored-by: Shun Sakai <sorairolake@protonmail.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants