Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove redundant ARIA roles from elements with implicit role #2245

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/views/administrate/application/_collection.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ to display a collection of resources in an HTML table.
cell-label--<%= collection_presenter.ordered_html_class(attr_name) %>
cell-label--<%= "#{collection_presenter.resource_name}_#{attr_name}" %>"
scope="col"
role="columnheader"
aria-sort="<%= sort_order(collection_presenter.ordered_html_class(attr_name)) %>">
<%= link_to(sanitized_order_params(page, collection_field_name).merge(
collection_presenter.order_params_for(attr_name, key: collection_field_name)
Expand Down
2 changes: 1 addition & 1 deletion app/views/administrate/application/_index_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%= display_resource_name(page.resource_name) %>
<% end %>

<header class="main-content__header" role="banner">
<header class="main-content__header">
<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/_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" role="navigation">
<nav class="navigation">
<%= link_to(t("administrate.navigation.back_to_app"), root_url, class: "button button--alt button--nav") if defined?(root_url) %>

<% Administrate::Namespace.new(namespace).resources_with_index_route.each do |resource| %>
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_resource", name: page.page_title) } %>

<header class="main-content__header" role="banner">
<header class="main-content__header">
<h1 class="main-content__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 @@ -22,7 +22,7 @@ to do the heavy lifting.
) %>
<% end %>

<header class="main-content__header" role="banner">
<header class="main-content__header">
<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_resource", name: page.page_title) } %>

<header class="main-content__header" role="banner">
<header class="main-content__header">
<h1 class="main-content__page-title">
<%= content_for(:title) %>
</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/administrate/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ By default, it renders:
<div class="app-container">
<%= render "navigation" -%>

<main class="main-content" role="main">
<main class="main-content">
<%= render "flashes" -%>
<%= yield %>
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<%= display_resource_name(page.resource_name) %>
<% end %>

<header class="main-content__header" role="banner">
<header class="main-content__header">
<h1 class="main-content__page-title" id="page-title">
<%= content_for(:title) %>
</h1>
Expand Down
2 changes: 1 addition & 1 deletion spec/example_app/spec/features/log_search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
end

def have_records_table(rows:)
have_css("[role=main] table tr[data-url]", count: rows)
have_css("table tr[data-url]", count: rows)
end

def submit_search
Expand Down