Skip to content

Commit

Permalink
Add ARIA landmark roles
Browse files Browse the repository at this point in the history
ARIA landmark roles provide useful navigation features for assistive
technology and helps people understand the content structure.
  • Loading branch information
tysongach committed May 7, 2017
1 parent 0328c2b commit 62af02d
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/views/administrate/application/_navigation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ for all resources in the admin dashboard,
as defined by the routes in the `admin/` namespace
%>

<nav class="navigation">
<nav class="navigation" role="navigation">
<% Administrate::Namespace.new(namespace).resources.each do |resource| %>
<%= link_to(
display_resource_name(resource),
Expand Down
2 changes: 1 addition & 1 deletion app/views/administrate/application/_search.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form class="search">
<form class="search" role="search">
<span class="search__icon">
<%= svg_tag "administrate/search.svg", "search", width: 16, height: 16 %>
</span>
Expand Down
2 changes: 1 addition & 1 deletion app/views/administrate/application/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ It displays a header, and renders the `_form` partial to do the heavy lifting.

<% content_for(:title) { "#{t("administrate.actions.edit")} #{page.page_title}" } %>

<header class="main-content__header">
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title">
<%= content_for(:title) %>
</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/views/administrate/application/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ It renders the `_table` partial to display details about the resources.
<% end %>
<% end %>

<header class="main-content__header">
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title" id="page-title">
<%= content_for(:title) %>
</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/views/administrate/application/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ to do the heavy lifting.

<% content_for(:title) { "#{t("administrate.actions.new")} #{page.resource_name.titleize}" } %>

<header class="main-content__header">
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title">
<%= content_for(:title) %>
</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/views/administrate/application/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ as well as a link to its edit page.

<% content_for(:title) { "#{t("administrate.actions.show")} #{page.page_title}" } %>

<header class="main-content__header">
<header class="main-content__header" role="banner">
<h1 class="main-content__page-title">
<%= content_for(:title) %>
</h1>
Expand Down

0 comments on commit 62af02d

Please sign in to comment.