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

Primary Navigation Styling and Semantics #650

Open
garyb1 opened this issue Nov 24, 2023 · 6 comments
Open

Primary Navigation Styling and Semantics #650

garyb1 opened this issue Nov 24, 2023 · 6 comments
Assignees

Comments

@garyb1
Copy link
Contributor

garyb1 commented Nov 24, 2023

Context

  1. Provide active styles to the current active link
  2. Markup the current page with aria-current="page". This represents the current page within a set of pages. You can use this attribute as a hook for styling. You can read more about this on Adrian Roselli's Post Using CSS to Enforce Accessibility
  3. Ensure navigation landmarks have a unique accessible name. Differentiate between the primary navigation and the footer navigation by providing an accessible name to the nav elements.

Expected Behavior

Example Markup


<nav aria-label="primary">
  <ul role="list">
     <li><a href="/home" aria-current="page">Home</a></li>
     <li><a href="/articles">Articles</a></li>
  </ul>
</nav>

Current Behavior

No semantics or styling provided

Screenshots

Codu website primary navbar

Steps to reproduce

Inspect primary navigation on all pages

Copy link

Uh oh! @garyb1, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

@garyb1
Copy link
Contributor Author

garyb1 commented Nov 24, 2023

@NiallJoeMaher see github action above .. even I miss it sometimes!

@garyb1
Copy link
Contributor Author

garyb1 commented Nov 24, 2023

Alt text added 👍

@NiallJoeMaher
Copy link
Contributor

That's fantastic! I love our new alt text bot. 🦾

@NiallJoeMaher
Copy link
Contributor

I'm going to take this one! Redesigning our nav now.

@NiallJoeMaher NiallJoeMaher self-assigned this Dec 17, 2023
@garyb1
Copy link
Contributor Author

garyb1 commented Dec 18, 2023

Sure thing @NiallJoeMaher ..got any designs you'd like me to review? 🙂

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

No branches or pull requests

2 participants