Skip to content

Commit

Permalink
Merge pull request #36 from CDL-Dryad/a11y-describe-fixes
Browse files Browse the repository at this point in the history
Accessibility fixes for "Describe" page
  • Loading branch information
sfisher authored Jan 7, 2020
2 parents 3432042 + dc32e84 commit bff953a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
3 changes: 2 additions & 1 deletion spec/features/stash_datacite/dataset_versioning_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,8 @@
def update_dataset(curator: false)
# Add a value to the dataset, submit it and then mock a successful submission
navigate_to_metadata
find('#data_description_opener').click
description_divider = find('h2', text: 'Data Description')
description_divider.click
fill_in 'related_identifier[related_identifier]', with: 'http://doi.org/10.5061/dryad.888gm50'
# Submit the changes
navigate_to_review
Expand Down
2 changes: 1 addition & 1 deletion spec/features/stash_datacite/new_dataset_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

# ##############################
# Optional fields
description_divider = find('summary', text: 'Data Description')
description_divider = find('h2', text: 'Data Description')
description_divider.click

# ##############################
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
<main>
<%= render partial: 'stash_datacite/metadata_entry_pages/metadata_entry_form' %>
<%= render partial: 'stash_engine/shared/dataset_steps_bottom_nav' %>
</main>
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@

<p class="c-input__required-note">required fields</p>

<details class="c-fgroup" role="group">
<summary class="o-showhide__summary c-fgroup__summary" id="data_description_opener">Data Description</summary>
<h2 class="o-heading__page-span">Data Description</h2>

<% if @metadata_entry.subjects.empty? %>
<%= render partial: "stash_datacite/subjects/form", locals: { subject: @metadata_entry.new_subject, resource_id: @resource.id } %>
Expand All @@ -58,7 +57,7 @@
<%= render partial: "stash_datacite/contributors/form", locals: { contributor: @metadata_entry.new_contributor, path: stash_datacite.contributors_create_path } %>
<% end %>
</div>
<%= link_to "add another funder", stash_datacite.contributors_new_path( resource_id: @resource.id ), remote: :true, class: 't-describe__add-funder-button o-button__add', role: 'button' %>
<%= link_to "add another funder", stash_datacite.contributors_new_path( resource_id: @resource.id ), remote: :true, class: 't-describe__add-funder-button o-button__add' %>
</fieldset>

<fieldset class="c-fieldset">
Expand All @@ -74,4 +73,3 @@
</div>
<%= link_to "add another related work", stash_datacite.related_identifiers_new_path( resource_id: @resource.id ), remote: :true, class: 'o-button__add' %>
</fieldset>
</details>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p>My data is related to:</p>
<p id="import-choices-label">My data is related to:</p>
<%= form_for(@publication, url: publications_update_path, method: :patch, remote: true, authenticity_token: true) do |f| %>
<div class="c-import__choicesbox js-import-choice">
<div class="c-import__choicesbox js-import-choice" role="group" aria-labelledby="import-choices-label">
<div class="c-import__choicebox">
<div class="c-import__icon"><i class="fa fa-pencil-square-o fa-3x"></i></div>
<div>
Expand Down

0 comments on commit bff953a

Please sign in to comment.