-
Notifications
You must be signed in to change notification settings - Fork 509
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AO3-6553 Turn homepage media list into navigation
Semantically, the list of media (plus All Fandoms) is a navigation element, not a menu. The preferred element to use would be `nav`, but we don't use this anywhere else (yet), so for consistency I'm adding a `div` with the role navigation. (Per https://www.w3.org/TR/html-aria/#docconformance, `ul`s are not allowed to have the role `navigation`.) I've also done the two "easy" translation strings.
- Loading branch information
1 parent
d997475
commit 365f1ea
Showing
2 changed files
with
14 additions
and
8 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 |
---|---|---|
@@ -1,10 +1,12 @@ | ||
<ul class="menu" role="menu"> | ||
<li><%= link_to ts('All Fandoms', key: 'header.fandom'), media_path %></li> | ||
<% cache "menu-fandoms-version4", skip_digest: true do %> | ||
<% Media.for_menu.each do |medium| %> | ||
<% unless medium.id.nil? %> | ||
<li id="medium_<%= medium.id %>"><%= link_to ts("#{medium.name}", key: 'header.fandom'), medium_fandoms_path(medium) %></li> | ||
<div role="navigation" aria-label="<%= t(".media") %>"> | ||
<ul class="menu"> | ||
<li><%= link_to t(".all_fandoms"), media_path %></li> | ||
<% cache "menu-fandoms-version4", skip_digest: true do %> | ||
<% Media.for_menu.each do |medium| %> | ||
<% unless medium.id.nil? %> | ||
<li id="medium_<%= medium.id %>"><%= link_to ts("#{medium.name}", key: 'header.fandom'), medium_fandoms_path(medium) %></li> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
</ul> | ||
</ul> | ||
</div> |
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