-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor markup to provide more semantic meaning
Why these changes are being introduced: It was suggested in a recent meeting with DAS that the best way to make a page navigable to screen reader users is by using semantic HTML and ARIA roles. Relevant ticket(s): * [GDT-279](https://mitlibraries.atlassian.net/browse/GDT-279) How this addresses that need: This attempts to make better use of semantic HTML elements and ARIA roles throughout our views. One notable change is the addition of the `application` layout from our theme. The layout has been added in a separate commit to clarify what changes were made. Customization of this layout is needed because the it adds a `main` tag that surrounds all content between the nav and footer. While this corresponds to the main content for some apps, it is less useful in TIMDEX UI. Side effects of this change: * This should be considered a first iteration, as we have not undergone a11y review yet. I tried to use a light touch due to my lack of familiarity with ARIA, but we may learn that additional context would be useful. * We may decide in the future to make the changes to the `application` layout upstream, in the theme gem. This would require making corresponding changes in all of our Rails apps, so it is out of scope of this ticket. * The full record sidebar is an `aside` in non-GDT apps, but in GDT it includes the access link. To accommodate this, we've given it a `role=region` with an `aria-label` mentioning the access link. Long-term, however, we should consider moving this button outside of the sidebar, so it has more prominence in the markup.
- Loading branch information
Showing
12 changed files
with
33 additions
and
26 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,7 +1,7 @@ | ||
<%= content_for(:title, index_page_title) %> | ||
|
||
<div class="space-wrap"> | ||
<main class="space-wrap"> | ||
<%= render partial: "shared/site_title" %> | ||
<%= render partial: "search/form" %> | ||
<%= render partial: "static/about" if ENV.fetch('ABOUT_APP', nil) %> | ||
</div> | ||
</main> |
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
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
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,3 +1,5 @@ | ||
<h1>Record not found</h1> | ||
<main id="full-record" class="box-content region full-record"> | ||
<h2>Record not found</h2> | ||
|
||
<p>No record was returned by our systems. </p> | ||
<p>No record was returned by our systems. </p> | ||
</main> |
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
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
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
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
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
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
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,6 +1,6 @@ | ||
<% return unless error['message'].present? %> | ||
|
||
<div class="alert alert-banner error"> | ||
<div class="alert alert-banner error" role="alert"> | ||
<%= error['message'] %><br> | ||
<%= error&.dig('extensions')&.dig('problems')&.pluck("explanation")&.join %> | ||
</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