-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AO3-6553 Better semantics and a11y for the media list on the homepage (…
…#4581) AO3-6553 Turn homepage media list into navigation Semantically, the list of media (plus All Fandoms) on the homepage is a navigation element, not a menu. The list of media used in the main site menu needs to stay a `menu`, so we're unDRYing the partial and creating a new partial just for use on the homepage. The preferred element to use in modern web development is `nav`. We don't use this anywhere else (yet), so this will be our test case. (Per https://www.w3.org/TR/html-aria/#docconformance, `ul`s are not allowed to have the role `navigation`.)
- Loading branch information
1 parent
c472b7a
commit 53395fd
Showing
4 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<ul> | ||
<li><%= link_to t(".all_fandoms"), media_path %></li> | ||
<% cache "homepage-fandoms-version1", skip_digest: true do %> | ||
<% Media.for_menu.each do |medium| %> | ||
<% unless medium.id.nil? %> | ||
<li><%= link_to ts("#{medium.name}"), medium_fandoms_path(medium) %></li> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters