Skip to content

Commit

Permalink
Merge pull request #3179 from sul-dlss/3171-welcome-accessibility
Browse files Browse the repository at this point in the history
Some accessibility fixes for welcome/home page
  • Loading branch information
mjgiarlo authored Jul 5, 2023
2 parents e56616b + 5eb7931 commit e6b4a0f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/frontpage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
color: #FEC51D;
}

.btn-default {
--bs-btn-hover-border-color: var(--bs-link-hover-color);
}

.page-content-message {
font-size: 1.1rem;
font-style: italic;
Expand Down
2 changes: 1 addition & 1 deletion app/components/help_collection_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<div class="form-check">
<%= form.check_box(:collection, {multiple: true, class: "form-check-input"}, label) %>
<%= form.label :collection, label, value: label, class: "form-check-label" %>
<%= form.label :collection, label, value: label, class: "form-check-label", "aria-describedby": "popover-#{description_key}" %>
<%= render PopoverComponent.new(key: description_key, scope: scope) %>
</div>
2 changes: 1 addition & 1 deletion app/components/popover_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<a tabindex="0" data-controller="popover" data-bs-placement="top" data-bs-content="<%= text %>" data-bs-html="true" class="info-icon">
<a id="popover-<%= key %>" tabindex="0" data-controller="popover" data-bs-placement="top" data-bs-content="<%= text %>" data-bs-html="true" class="info-icon">
<span class="<%= icon %>" aria-hidden="true"></span><span class="visually-hidden">more information</span>
</a>
2 changes: 1 addition & 1 deletion app/components/popover_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def initialize(key:, icon: "fa-solid fa-info-circle", scope: "tooltip")
@scope = scope
end

attr_reader :icon, :scope
attr_reader :icon, :scope, :key

def text
t(@key, scope:)
Expand Down
4 changes: 2 additions & 2 deletions app/views/helps/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<div class="col-md-9">
<div class="form-group">
<%= form.label(:name, "What is your name?") %>
<%= form.text_field(:name, class: "form-control") %>
<%= form.text_field(:name, autocomplete: "name", class: "form-control") %>
</div>
</div>
</div>
<div class="row">
<div class="col-md-9">
<div class="form-group">
<%= form.label(:email, "What is your email address?*") %>
<%= form.text_field(:email, value: @email, class: "form-control", required: true) %>
<%= form.text_field(:email, autocomplete: "email", value: @email, class: "form-control", required: true) %>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
<%= render "shared/terms_of_deposit" %>
<%= render "shared/help_modal" %>
<%= yield %>

</div>
</div>

Expand Down

0 comments on commit e6b4a0f

Please sign in to comment.