-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Checks
- I have thoroughly read and understand The Odin Project Contributing Guide
- The title of this issue follows the
Bug: brief description of bugformat, e.g.Bug: Lesson complete button does not update on click - Would you like to work on this issue?
Bug description
Various a11y issues that should be resolved for the lesson side navigation (this can be considered an epic consisting of several issues; each of these issues should have a separate PR):
-
Side navigation not visible at smaller viewports - Basically the lesson side navigation is not visible when zoom is higher or viewport is smaller, which is an issue that needs to be resolved. Ideally the navigation should be collapsible/expandable regardless of viewport/zoom, rather than just completely hiding it at a certain point. This may involve updating the
h4heading -
Related to above, we should move the lesson jump links from the right side of the screen (in LTR languages) to the left in the DOM. This would satisfy being able to traverse those jump links before the actual lesson content (right now you basically have to go through the entire lesson just to get focus into those jump links, unless you're using some AT that has nifty shortcuts that can help alleviate that)
-
Reconsider wrapper element for the lesson nav from an
asideto anav. While an aside may make sense in terms of positioning, it really is more of a navigation. Doing this we could also remove theh4tag as it's no longer really a section of content; we should keep the text, though, and this text should be used as the labeling text for the nav/ul viaaria-labelledby -
Apply
aria-current="location"to thelielement that contains the link which is currently "active". May also want to consider applying a more noticeable style to the current jump link rather than just a slight background/text color change, like removing the left border from allli's except the active one (screenshot below)

-
Apply a
role="list"to the navulelement. It's redundant, but Safari removes the semantics for lists that remove the list styling. This would apply to other areas of the site that uses lists in this way as well. We should also apply an aria-labelledby to this ul element, referencing the "Lesson contents" heading.
How to reproduce
Visit any lesson (like our working with text lesson) and compare the above comments to the side navigation. Some may not be reproducible without a screen reader (aria-current for example).
Expected behavior
- The side nav is able to be viewed regardless of zoom/viewport width
- The side navigation is announced semantically as a navigation element as it contains links for the lesson itself (rather than external links)
- The side
navand/orulelements are labeled by the "Lesson content" text - The currently active jump link is announced as the current link via
aria-current, and has improved active styling - The
ulelement retains its semantics viarole="list"for Safari, which removes the semantics when certain styles are applied to theul
What browsers are you seeing the problem on?
No response
What OS are you using?
No response
Discord Name
No response
Additional Comments
cc @KevinMulhern in case some of these issues need some design input, may be worth getting together async to chat about them
Metadata
Metadata
Assignees
Labels
Type
Projects
Status