While people using screen readers already have keyboard shortcuts to jump to the <main> tag, there are people who navigate the page with the keyboard using just the tab key, and for them, this link provides a way to save time and start reading the main content instead of having to manually go through all the navigation links every time a new page is loaded. Note that we had to add an additional `width: 0` rule because Foundation's `element-invisible` would apply `1px` and the test checking for `visible: :hidden` would faile.
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
<!DOCTYPE html>
|
|
<html <%= common_html_attributes %>>
|
|
<head>
|
|
<%= render "layouts/common_head", default_title: "Admin" %>
|
|
<%= render "layouts/no_script" %>
|
|
<%= content_for :head %>
|
|
</head>
|
|
|
|
<body class="admin">
|
|
<%= render Layout::SkipToMainContentComponent.new %>
|
|
<%= render Layout::AdminHeaderComponent.new(current_user) %>
|
|
|
|
<div class="menu-and-content">
|
|
<%= check_box_tag :show_menu, nil, false, role: "switch" %>
|
|
|
|
<nav id="side_menu" class="admin-sidebar">
|
|
<% if namespace == "admin" %>
|
|
<%= render Admin::MenuComponent.new %>
|
|
<% elsif namespace == "sdg_management" %>
|
|
<%= render SDGManagement::MenuComponent.new %>
|
|
<% else %>
|
|
<%= render "/#{namespace}/menu" %>
|
|
<% end %>
|
|
</nav>
|
|
|
|
<main id="main" class="admin-content <%= yield(:main_class) %>">
|
|
<%= label_tag :show_menu, t("admin.menu.admin"),
|
|
"aria-hidden": true, class: "button hollow expanded" %>
|
|
|
|
<%= render "layouts/flash" %>
|
|
<%= render "layouts/officing_booth" if controller.class.module_parent == Officing && session[:booth_id].present? %>
|
|
<%= yield %>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|