Skip to content

Commit e1835b4

Browse files
committed
ADA-747 image elements
updated Brakeman gem updated Gemfile.lock for brakeman removed redundant title attribute in <a> tags
1 parent 82da49c commit e1835b4

File tree

6 files changed

+61
-50
lines changed

6 files changed

+61
-50
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ group :development do
4343
end
4444

4545
group :test do
46-
gem 'brakeman', '~> 7.0'
46+
gem 'brakeman', '~> 8.0'
4747
gem 'capybara', '>= 2.15'
4848
gem 'rspec_junit_formatter', '~> 0.4.1'
4949
gem 'selenium-webdriver'

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ GEM
9292
bootstrap-sass (3.4.1)
9393
autoprefixer-rails (>= 5.2.1)
9494
sassc (>= 2.0.0)
95-
brakeman (7.1.1)
95+
brakeman (8.0.4)
9696
racc
9797
builder (3.3.0)
9898
bundler-audit (0.9.2)
@@ -395,7 +395,7 @@ DEPENDENCIES
395395
berkeley_library-docker
396396
berkeley_library-logging
397397
bootstrap-sass
398-
brakeman (~> 7.0)
398+
brakeman (~> 8.0)
399399
bundler-audit
400400
byebug
401401
capybara (>= 2.15)

app/views/layouts/application.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</head>
99
<body>
1010
<div class="container">
11-
<%= link_to image_tag(asset_path('nara.jpg')),"https://web.archive.org/web/20220124061848/https://bancroft.berkeley.edu/collections/chinese-immigration-to-the-united-states-1884-1944/index.html" %>
11+
<%= link_to image_tag(asset_path('nara.jpg'), alt: 'Chinese Immigration to the United States collection home'), "https://web.archive.org/web/20220124061848/https://bancroft.berkeley.edu/collections/chinese-immigration-to-the-united-states-1884-1944/index.html" %>
1212
</div>
1313
<div class="container">
1414
<h2 class="display-3">The Early Arrivals Records Search (EARS)</h2>

app/views/searchcase/display.html.erb

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,31 @@
33
<div id="main-search" class="container search-form">
44
<h3>Immigration record:</h3>
55
<%= form_tag(action="/searchcase/display", method: "get") do %>
6-
<%= text_field_tag(:q) %>
6+
<%= label_tag(:q, 'Search records') %>
7+
<%= text_field_tag(:q, params[:q], aria: { label: 'Search immigration records' }) %>
78
<%= submit_tag("Search", :class => "search-bar") %>
89
<% end %>
910
</div>
1011

1112
<%= will_paginate @return %>
1213
<table id='table'>
13-
<td class="record_col">Last Name</td>
14-
<td class="record_col">First Name</td>
15-
<td class="record_col">Middle Name</td>
16-
<td class="record_col">Age</td>
17-
<td class="record_col">Gender</td>
18-
<td class="record_col">Port</td>
19-
<td class="record_col">Date</td>
20-
<td class="record_col">Ship</td>
21-
<td class="record_col">Destination</td>
22-
</tr>
14+
<caption>Search results for immigration records</caption>
15+
<thead>
16+
<tr>
17+
<th class="record_col" scope="col">Last Name</th>
18+
<th class="record_col" scope="col">First Name</th>
19+
<th class="record_col" scope="col">Middle Name</th>
20+
<th class="record_col" scope="col">Age</th>
21+
<th class="record_col" scope="col">Gender</th>
22+
<th class="record_col" scope="col">Port</th>
23+
<th class="record_col" scope="col">Date</th>
24+
<th class="record_col" scope="col">Ship</th>
25+
<th class="record_col" scope="col">Destination</th>
26+
</tr>
27+
</thead>
28+
<tbody>
2329
<% @return.each do |row| %>
30+
<tr>
2431
<td class="record_col">
2532
<% if row.LASTNAME.nil? %>
2633
<%= link_to("No Lastname in NARA", {:controller => "searchcase", :action => "full_display", :data => row},{:style=>'color:#2E64FE;'}) %>
@@ -35,8 +42,10 @@
3542
<td class="record_col"><%= row.PORT%></td>
3643
<td class="record_col"><%= row.DATE %></td>
3744
<td class="record_col"><%= row.SHIP %></td>
38-
<td class="record_col"><%= row.DESTINATION %></td></tr>
45+
<td class="record_col"><%= row.DESTINATION %></td>
46+
</tr>
3947
<% end %>
48+
</tbody>
4049
</table>
4150
<%= will_paginate @return %>
4251
<div class="push"></div>

app/views/searchcase/full_display.html.erb

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,41 @@
44
<div class="container">
55
<h3> Record details below</h3>
66
<table class="full-display">
7+
<caption>Full immigration record details</caption>
78
<% @return.each do |row| %>
8-
<td class="record-detail">LastName</td><td><%= row.LASTNAME %></td></tr>
9-
<td class="record-detail">FirstName</td><td><%= row.FIRSTNAME %></td></tr>
10-
<td class="record-detail">MiddleName</td><td><%= row.MIDDLENAME %></td></tr>
11-
<td class="record-detail">Box Number</td><td><%= row.BOXNUMBER %></td></tr>
12-
<td class="record-detail">Series</td><td><%= row.SERIES %></td></tr>
13-
<td class="record-detail">Case Number</td><td><%= row.CASENUMBER %></td></tr>
14-
<td class="record-detail">Ship</td><td><%= row.SHIP %></td></tr>
15-
<td class="record-detail">Port</td><td><%= row.PORT %></td></tr>
16-
<td class="record-detail">Date</td><td><%= row.DATE %></td></tr>
17-
<td class="record-detail">Destination</td><td><%= row.DESTINATION %></td></tr>
18-
<td class="record-detail">Birthplace</td><td><%= row.BIRTHPLACE %></td></tr>
19-
<td class="record-detail">Birthplace City</td><td><%= row.BIRTHPLACE_CITY %></td></tr>
20-
<td class="record-detail">Birthplace State</td><td><%= row.BIRTHPLACE_STATE %></td></tr>
21-
<td class="record-detail">Birthplace City</td><td><%= row.BIRTHPLACE_CITY %></td></tr>
22-
<td class="record-detail">Date of Birth</td><td><%= row.DOB %></td></tr>
23-
<td class="record-detail">Age</td><td><%= row.AGE %></td></tr>
24-
<td class="record-detail">Gender</td><td><%= row.GENDER %></td></tr>
25-
<td class="record-detail">AFilenum</td><td><%= row.AFILENUM %></td></tr>
26-
<td class="record-detail">Class</td><td><%= row.CLASS %></td></tr>
27-
<td class="record-detail">Disposition of Case</td><td><%= row.DISPOSITION_OF_CASE %></td></tr>
28-
<td class="record-detail">Birth Street</td><td><%= row.ST_BORN %></td></tr>
29-
<td class="record-detail">House Number</td><td><%= row.HOUSE_NUM %></td></tr>
30-
<td class="record-detail">Other Last Name</td><td><%= row.OTHERNAMEL %></td></tr>
31-
<td class="record-detail">Other First Name</td><td><%= row.OTHERNAMEF %></td></tr>
32-
<td class="record-detail">Other Middle Name</td><td><%= row.OTHERNAMEM %></td></tr>
33-
<td class="record-detail">Certificate of Residence</td><td><%= row.CERTIFICATE_OF_RESIDENCE %></td></tr>
34-
<td class="record-detail">Certificate of Identity</td><td><%= row.CERTIFICATE_OF_IDENTITY %></td></tr>
35-
<td class="record-detail">Red Eagle Certificate</td><td><%= row.RED_EAGLE_CERTIFICATE %></td></tr>
36-
<td class="record-detail">Court Record</td><td><%= row.COURT_RECORD %></td></tr>
37-
<td class="record-detail">Remarks</td><td><%= row.REMARKS %></td></tr>
38-
<td class="record-detail">Source</td><td><%= row.SOURCE %></td></tr>
39-
<td class="record-detail">Company</td><td><%= row.COMPANY %></td></tr>
40-
<td class="record-detail">Date Entered</td><td><%= row.DATE_ENTERED %></td></tr>
9+
<tr><th class="record-detail" scope="row">LastName</th><td><%= row.LASTNAME %></td></tr>
10+
<tr><th class="record-detail" scope="row">FirstName</th><td><%= row.FIRSTNAME %></td></tr>
11+
<tr><th class="record-detail" scope="row">MiddleName</th><td><%= row.MIDDLENAME %></td></tr>
12+
<tr><th class="record-detail" scope="row">Box Number</th><td><%= row.BOXNUMBER %></td></tr>
13+
<tr><th class="record-detail" scope="row">Series</th><td><%= row.SERIES %></td></tr>
14+
<tr><th class="record-detail" scope="row">Case Number</th><td><%= row.CASENUMBER %></td></tr>
15+
<tr><th class="record-detail" scope="row">Ship</th><td><%= row.SHIP %></td></tr>
16+
<tr><th class="record-detail" scope="row">Port</th><td><%= row.PORT %></td></tr>
17+
<tr><th class="record-detail" scope="row">Date</th><td><%= row.DATE %></td></tr>
18+
<tr><th class="record-detail" scope="row">Destination</th><td><%= row.DESTINATION %></td></tr>
19+
<tr><th class="record-detail" scope="row">Birthplace</th><td><%= row.BIRTHPLACE %></td></tr>
20+
<tr><th class="record-detail" scope="row">Birthplace City</th><td><%= row.BIRTHPLACE_CITY %></td></tr>
21+
<tr><th class="record-detail" scope="row">Birthplace State</th><td><%= row.BIRTHPLACE_STATE %></td></tr>
22+
<tr><th class="record-detail" scope="row">Birthplace City</th><td><%= row.BIRTHPLACE_CITY %></td></tr>
23+
<tr><th class="record-detail" scope="row">Date of Birth</th><td><%= row.DOB %></td></tr>
24+
<tr><th class="record-detail" scope="row">Age</th><td><%= row.AGE %></td></tr>
25+
<tr><th class="record-detail" scope="row">Gender</th><td><%= row.GENDER %></td></tr>
26+
<tr><th class="record-detail" scope="row">AFilenum</th><td><%= row.AFILENUM %></td></tr>
27+
<tr><th class="record-detail" scope="row">Class</th><td><%= row.CLASS %></td></tr>
28+
<tr><th class="record-detail" scope="row">Disposition of Case</th><td><%= row.DISPOSITION_OF_CASE %></td></tr>
29+
<tr><th class="record-detail" scope="row">Birth Street</th><td><%= row.ST_BORN %></td></tr>
30+
<tr><th class="record-detail" scope="row">House Number</th><td><%= row.HOUSE_NUM %></td></tr>
31+
<tr><th class="record-detail" scope="row">Other Last Name</th><td><%= row.OTHERNAMEL %></td></tr>
32+
<tr><th class="record-detail" scope="row">Other First Name</th><td><%= row.OTHERNAMEF %></td></tr>
33+
<tr><th class="record-detail" scope="row">Other Middle Name</th><td><%= row.OTHERNAMEM %></td></tr>
34+
<tr><th class="record-detail" scope="row">Certificate of Residence</th><td><%= row.CERTIFICATE_OF_RESIDENCE %></td></tr>
35+
<tr><th class="record-detail" scope="row">Certificate of Identity</th><td><%= row.CERTIFICATE_OF_IDENTITY %></td></tr>
36+
<tr><th class="record-detail" scope="row">Red Eagle Certificate</th><td><%= row.RED_EAGLE_CERTIFICATE %></td></tr>
37+
<tr><th class="record-detail" scope="row">Court Record</th><td><%= row.COURT_RECORD %></td></tr>
38+
<tr><th class="record-detail" scope="row">Remarks</th><td><%= row.REMARKS %></td></tr>
39+
<tr><th class="record-detail" scope="row">Source</th><td><%= row.SOURCE %></td></tr>
40+
<tr><th class="record-detail" scope="row">Company</th><td><%= row.COMPANY %></td></tr>
41+
<tr><th class="record-detail" scope="row">Date Entered</th><td><%= row.DATE_ENTERED %></td></tr>
4142
<% end %>
4243
</table>
4344
</div>

app/views/searchcase/search.html.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<div id="main-search" class="container search-form">
22
<h3>Immigration record:</h3>
33
<%= form_tag(action="/searchcase/display", method: "get") do %>
4-
<%= text_field_tag(:q) %>
4+
<%= label_tag(:q, 'Search records') %>
5+
<%= text_field_tag(:q, params[:q], aria: { label: 'Search immigration records' }) %>
56
<%= submit_tag("Search", :class => "search-bar") %>
67
<% end %>
78

0 commit comments

Comments
 (0)