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

[BUG] sidebar navigation accessibility issue with <li> #86

Open
lizdm-uw opened this issue Jan 9, 2025 · 3 comments
Open

[BUG] sidebar navigation accessibility issue with <li> #86

lizdm-uw opened this issue Jan 9, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@lizdm-uw
Copy link

lizdm-uw commented Jan 9, 2025

Describe the bug

On create.uw.edu Research menu (megamenus):

  • DubBot found a WCAG 2.1 Level A issue in menus: "Ensures that lists are structured correctly"
  • Impact: serious
  • Violations: WCAG 2.1 Level A: 1.3.1 Info and Relationships
  • Element Location: .page-item-2218 > .children
  • Element Source:
    • Failure Summary: Fix all of the following: List element has direct children that are not allowed: ul

    Describe your environment

    • UW Wordpress theme
    • Chrome version 131.0.6778.205 (Official Build) (arm64)

    Steps to reproduce

    1. View DubBot accessibility checker https://uw.dubbot.com/sites/6659f030d82e820001b310f5/pages/6660852f8c59897b190de269
    Screenshot 2025-01-09 at 8 57 02 AM

    Expected behavior

    Current Behavior

    Possible Solution

    Screenshots / Video

    Related Issues and/or PRs

@lizdm-uw lizdm-uw added the bug Something isn't working label Jan 9, 2025
@lcaple
Copy link
Contributor

lcaple commented Jan 9, 2025

Thank you for reporting this. Updating this to note the issue is on the sidebar navigation and not the mega menu.

@lcaple lcaple changed the title [BUG] mega menu accessibility issue with <li> [BUG] sidebar navigation accessibility issue with <li> Jan 9, 2025
@tjsuw
Copy link
Contributor

tjsuw commented Jan 9, 2025

Hi @lizdm-uw, I've added this to our list to fix in our next round of accessibility fixes for the theme.

In the meantime, you might be able to clear this error in DubBot by revisiting the structure for these pages. I have a couple options for how you might be able to clear the error while waiting for a code update from us.

After doing some testing on our end, it appears that this empty ul.children is appearing when there are page(s) nested under the AI and Machine Learning Research page that have the "Hide from menu" option checked. (This is in the Page Attributes section, directly under where the Parent page is set.) If that checkbox is cleared for the child page(s), the previously hidden page(s) will appear in the menu and this will clear the error from DubBot.

Another option is to not nest the child page(s) under the AI and Machine Learning Research page. If they are intentionally hidden from the menu then you may find they don't need to be nested. That depends on your site structure and how you want it organized, of course.

If you do not have any child pages under the AI and Machine Learning Research page, please do let us know – then we can do a bit more research into how that unnecessary code is appearing.

@lizdm-uw
Copy link
Author

Thank you, @tjsuw for the tip! I unchecked the Hide from Menu option on each page. Since I've disabled the right sidebar on those pages, that option was redundant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants