hugo-theme-stack icon indicating copy to clipboard operation
hugo-theme-stack copied to clipboard

Improve sidebar bottom menu accessibility

Open TheJiahao opened this issue 1 year ago • 2 comments

  • 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

TheJiahao avatar Jan 02 '24 19:01 TheJiahao

(redacted)

ottok avatar Feb 22 '24 07:02 ottok

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

ottok avatar Feb 24 '24 03:02 ottok

@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.

cubercsl avatar Mar 06 '24 13:03 cubercsl

@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.

TheJiahao avatar Mar 06 '24 18:03 TheJiahao