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 6, 2017
1 parent 8e957f5 commit b445299
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="header">
<header class="header" role="banner">
<h1 class="header__heading"><%= content_for(:title) %></h1>
<div class="header__actions">
<%= link_to(
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="header">
<header class="header" role="banner">
<h1 class="header__heading" id="page-title"><%= content_for(:title) %></h1>
<div class="header__actions">
<%= link_to(
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="header">
<header class="header" role="banner">
<h1 class="header__heading"><%= content_for(:title) %></h1>
<div class="header__actions">
<%= link_to t("administrate.actions.back"), :back, class: "button" %>
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="header">
<header class="header" role="banner">
<h1 class="header__heading"><%= content_for(:title) %></h1>
<div class="header__actions">
<%= link_to(
Expand Down

0 comments on commit b445299

Please sign in to comment.