Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
Backport "Rework accessibility improvements" to v0.22 (decidim#6336)
Browse files Browse the repository at this point in the history
* Rework accessibility improvements (decidim#6253)

Co-authored-by: Antti Hukkanen <antti.hukkanen@mainiotech.fi>
Co-authored-by: Ivan Vergés <ivan@platoniq.net>
# Conflicts:
#	Gemfile.lock
#	decidim-comments/app/assets/javascripts/decidim/comments/bundle.js
#	decidim-comments/app/frontend/comments/comment.component.tsx
#	decidim-core/app/assets/javascripts/decidim/diff_mode_dropdown.js.es6
#	decidim-core/app/cells/decidim/author/flag.erb
#	decidim-core/app/cells/decidim/diff/attribute.erb
#	decidim-core/app/views/decidim/scopes/_scopes_picker_input.html.erb
#	decidim-core/spec/cells/decidim/diff_cell_spec.rb
#	decidim-core/spec/system/registration_spec.rb
#	decidim-debates/app/views/decidim/debates/debates/_form.html.erb
#	decidim-debates/config/locales/en.yml
#	decidim-debates/spec/system/debates_versions_spec.rb
#	decidim-forms/app/views/decidim/forms/questionnaires/_answer.html.erb
#	decidim-forms/lib/decidim/forms/test/shared_examples/manage_questionnaire_answers.rb
#	decidim-forms/lib/decidim/forms/test/shared_examples/manage_questionnaires/add_questions.rb
#	decidim-meetings/config/locales/en.yml
#	decidim-meetings/spec/system/explore_meetings_spec.rb

* rebuild bundle j

* fix scopes picker

* spec corrections

* fix scop test

Co-authored-by: Javier Usobiaga <javier@swwweet.com>
  • Loading branch information
microstudi and htmlboy committed Jul 28, 2020
1 parent 76aa8a1 commit de2e5e7
Show file tree
Hide file tree
Showing 583 changed files with 7,500 additions and 2,839 deletions.
60 changes: 31 additions & 29 deletions Gemfile.lock
Expand Up @@ -87,7 +87,7 @@ PATH
doorkeeper-i18n (~> 4.0)
etherpad-lite (~> 0.3)
file_validators (~> 2.1)
foundation-rails (~> 6.4, < 6.5)
foundation-rails (~> 6.6, < 6.7)
foundation_rails_helper (~> 3.0)
geocoder (>= 1.5)
hashdiff (>= 0.4.0, < 2.0.0)
Expand Down Expand Up @@ -267,8 +267,8 @@ GEM
tzinfo (~> 1.1)
acts_as_list (0.9.19)
activerecord (>= 3.0)
addressable (2.6.0)
public_suffix (>= 2.0.2, < 4.0)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
anchored (1.1.0)
arel (9.0.0)
ast (2.4.1)
Expand All @@ -292,13 +292,13 @@ GEM
html_tokenizer (~> 0.0.6)
parser (>= 2.4)
smart_properties
bindex (0.7.0)
bootsnap (1.4.4)
bindex (0.8.1)
bootsnap (1.4.6)
msgpack (~> 1.0)
browser (2.7.1)
builder (3.2.4)
byebug (11.0.1)
capybara (3.32.2)
byebug (11.1.3)
capybara (3.33.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
Expand Down Expand Up @@ -361,7 +361,7 @@ GEM
devise_invitable (1.7.5)
actionmailer (>= 4.1.0)
devise (>= 4.0.0)
diff-lcs (1.3)
diff-lcs (1.4.4)
diffy (3.3.0)
doc2text (0.4.2)
nokogiri (~> 1.10.0)
Expand Down Expand Up @@ -391,17 +391,17 @@ GEM
factory_bot_rails (4.11.1)
factory_bot (~> 4.11.1)
railties (>= 3.0.0)
faker (1.9.3)
faker (1.9.6)
i18n (>= 0.7)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.25)
file_validators (2.3.0)
activemodel (>= 3.2)
mime-types (>= 1.0)
foundation-rails (6.4.3.0)
foundation-rails (6.6.2.0)
railties (>= 3.1.0)
sass (>= 3.3.0, < 3.5)
sass (>= 3.3.0)
sprockets-es6 (>= 0.9.0)
foundation_rails_helper (3.0.0)
actionpack (>= 4.1, < 6.0)
Expand Down Expand Up @@ -466,18 +466,17 @@ GEM
kaminari-core (= 1.2.1)
kaminari-core (1.2.1)
kramdown (1.17.0)
launchy (2.4.3)
addressable (~> 2.3)
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.7.0)
launchy (~> 2.2)
letter_opener_web (1.3.4)
letter_opener_web (1.4.0)
actionmailer (>= 3.2)
letter_opener (~> 1.0)
railties (>= 3.2)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.3.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand Down Expand Up @@ -545,9 +544,9 @@ GEM
paper_trail (10.3.1)
activerecord (>= 4.2)
request_store (~> 1.1)
parallel (1.19.1)
parser (2.7.1.3)
ast (~> 2.4.0)
parallel (1.19.2)
parser (2.7.1.4)
ast (~> 2.4.1)
pg (1.1.4)
pg_search (2.3.2)
activerecord (>= 5.2)
Expand Down Expand Up @@ -582,10 +581,10 @@ GEM
bundler (>= 1.3.0)
railties (= 5.2.4.3)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.4)
actionpack (>= 5.0.1.x)
actionview (>= 5.0.1.x)
activesupport (>= 5.0.1.x)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
Expand All @@ -607,8 +606,8 @@ GEM
activerecord (>= 5.0)
activesupport (>= 5.0)
i18n
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rectify (0.13.0)
activemodel (>= 4.1.0)
Expand Down Expand Up @@ -674,10 +673,13 @@ GEM
rubocop (>= 0.68.1)
ruby-ole (1.2.12.2)
ruby-progressbar (1.10.1)
ruby_dep (1.5.0)
rubyzip (2.0.0)
safe_yaml (1.0.5)
sass (3.4.25)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.3.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
Expand Down
23 changes: 23 additions & 0 deletions config/i18n-tasks.yml
Expand Up @@ -90,14 +90,18 @@ search:
# Do not consider these keys missing:
ignore_missing:
- components.*
- browse_resource
- email_subject
- email_intro
- email_outro
- follows.create.participatory_space
- notification_title
- decidim.wizard_step_form_cell.*
- decidim.proposals.application_helper.activity_filter_values.*
- decidim.content_blocks.*_settings_form.show.*
- decidim.newsletter_templates.*_settings_form.show.*
- participate_in
- see_other_versions
- actions.invalid_destroy.proposals_count

# Consider these keys used:
Expand All @@ -116,11 +120,27 @@ ignore_unused:
- decidim.assemblies.statistics.*
- decidim.components.*
- decidim.filters.linked_classes.*
- decidim.follows.create.participatory_space
- decidim.forms.errors.*
- decidim.forms.file_help.*
- decidim.forms.user_answers_serializer.*
- decidim.participatory_processes.statistics.*
- decidim.proposals.answers.*
- decidim.proposals.collaborative_drafts.show.see_other_versions
- decidim.proposals.collaborative_drafts.wizard_aside.back
- decidim.proposals.collaborative_drafts.wizard_aside.back_from_collaborative_draft
- decidim.proposals.collaborative_drafts.wizard_aside.back_from_step_1
- decidim.proposals.collaborative_drafts.wizard_aside.back_from_step_2
- decidim.proposals.collaborative_drafts.wizard_aside.back_from_step_3
- decidim.proposals.collaborative_drafts.wizard_aside.back_from_step_4
- decidim.proposals.proposal_endorsements_helper.endorsements_count_title
- decidim.proposals.proposals.orders.*
- decidim.proposals.proposals.endorsements_card_row.comments_title
- decidim.proposals.proposals.wizard_aside.back
- decidim.proposals.proposals.wizard_aside.back_from_step_1
- decidim.proposals.proposals.wizard_aside.back_from_step_2
- decidim.proposals.proposals.wizard_aside.back_from_step_3
- decidim.proposals.proposals.wizard_aside.back_from_step_4
- decidim.proposals.proposals.show.proposal_accepted_reason
- decidim.proposals.proposals.show.proposal_in_evaluation_reason
- decidim.proposals.proposals.show.proposal_rejected_reason
Expand Down Expand Up @@ -197,6 +217,7 @@ ignore_unused:
- decidim.amendments.amendable.error
- decidim.amendments.emendation.announcement.*
- decidim.amendments.accept.error
- decidim.search.results
- decidim.searches.filters.state.*
- decidim.assemblies.filter.*
- decidim.initiatives.initiatives.votes_count.count.*
Expand All @@ -209,10 +230,12 @@ ignore_unused:
- decidim.admin_terms_of_use.default_body
- decidim.admin.admin_terms_of_use.required_review.alert
- decidim.budgets.projects.orders.*
- forms.length_validator.*
- layouts.decidim.widget.*
- layouts.decidim.assembly_widgets.*
- layouts.decidim.conference_widgets.*
- layouts.decidim.participatory_process_widgets.*
- layouts.decidim.participatory_process_groups.*
- decidim.newsletter_templates.basic_only_text.name
- decidim.newsletter_templates.image_text_cta.name
- decidim.content_blocks.*_settings_form.*
Expand Down
Expand Up @@ -5,7 +5,7 @@
}

a:focus{
outline: 2px solid $secondary;
outline: $anchor-outline-focus;
}

.categories--header{
Expand All @@ -18,7 +18,6 @@
}

span{
text-transform: uppercase;
font-size: 1.15rem;
color: lighten($dark-gray, 50);
}
Expand Down
Expand Up @@ -10,7 +10,6 @@

p{
font-weight: 600;
text-transform: uppercase;
margin-bottom: .25rem;
display: inline-block;
margin-right: .5rem;
Expand Down Expand Up @@ -44,7 +43,6 @@
.scope-filters{
div{
color: lighten($dark-gray, 50);
text-transform: uppercase;
margin-bottom: .15rem;
}

Expand Down Expand Up @@ -107,7 +105,6 @@
margin-bottom: .5rem;

.progress-text{
text-transform: uppercase;
color: lighten($dark-gray, 30);
}

Expand Down
Expand Up @@ -16,6 +16,6 @@
<%= link_to(
t("decidim.participatory_spaces.highlighted_results.see_all", count: results_count),
main_component_path(model),
class: "button button--sc light secondary button--right"
class: "button button--sc hollow button--right"
) %>
</section>
@@ -1,7 +1,7 @@
<div class="card card--action card--list">
<% resources.each do |result| %>
<div class="card--list__item">
<%= icon "actions", class: "card--list__icon", role: "img", remove_icon_class: true %>
<%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
<%= link_to resource_locator(result).path, class: "card--list__text card__link card__link--block" do %>
<h5 class="card--list__heading">
<%= translated_attribute(result.title) %>
Expand Down
Expand Up @@ -9,7 +9,7 @@
<div class="card card--action card--list">
<% results.each do |result| %>
<div class="card--list__item">
<%= icon "actions", class: "card--list__icon", role: "img", remove_icon_class: true %>
<%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
<%= link_to result_path(result), class: "card--list__text card__link card__link--block" do %>
<h4 class="card--list__heading">
Expand Down
Expand Up @@ -3,15 +3,28 @@
<div><%= t("results.filters.scopes", scope: "decidim.accountability") %></div>

<ul class="tags tags--action">
<li <%= active_class_if_current(nil) %>><%= link_to t("results.filters.all", scope: "decidim.accountability"), url_for(filter: { category_id: category.try(:id) }) %></li>
<li <%= active_class_if_current(nil) %>>
<%= link_to url_for(filter: { category_id: category.try(:id) }) do %>
<span class="show-for-sr"><%= Decidim::Scope.model_name.human(count: 2) %></span>
<%= t("results.filters.all", scope: "decidim.accountability") %>
<% end %>
</li>

<% if current_participatory_space.scope %>
<li <%= active_class_if_current(current_participatory_space.scope.id) %>>
<%= link_to translated_attribute(current_participatory_space.scope.name), url_for(filter: { scope_id: current_participatory_space.scope.id, category_id: category.try(:id) }) %>
<%= link_to url_for(filter: { scope_id: current_participatory_space.scope.id, category_id: category.try(:id) }) do %>
<span class="show-for-sr"><%= Decidim::Scope.model_name.human(count: 1) %></span>
<%= translated_attribute(current_participatory_space.scope.name) %>
<% end %>
</li>
<% end %>
<% current_participatory_space.subscopes.each do |scope| %>
<li <%= active_class_if_current(scope.id) %>><%= link_to translated_attribute(scope.name), url_for(filter: { scope_id: scope.id, category_id: category.try(:id) }) %></li>
<li <%= active_class_if_current(scope.id) %>>
<%= link_to url_for(filter: { scope_id: scope.id, category_id: category.try(:id) }) do %>
<span class="show-for-sr"><%= Decidim::Scope.model_name.human(count: 1) %></span>
<%= translated_attribute(scope.name) %>
<% end %>
</li>
<% end %>
</ul>
<% end %>
Expand Down
Expand Up @@ -3,7 +3,7 @@
<div class="input-group">
<%= search_field_tag "filter[search_text]", nil, class: "input-group-field", placeholder: t(".search"), value: "", title: t(".search") %>
<div class="input-group-button">
<button type="submit" class="button button--muted" aria-label="<%= t(".search") %>">
<button type="submit" class="button">
<%= icon "magnifying-glass", aria_label: t(".search"), role: "img" %>
</button>
</div>
Expand Down
Expand Up @@ -21,15 +21,15 @@
<% if result.versions.any? %>
<div class="definition-data__item versions_count">
<div>
<%= resource_version_number(result.versions_count, "text-large text-uppercase") %>
<%= resource_version_number(result.versions_count, "text-large") %>
<small class="text-medium">
<%= resource_version_of(result.versions_count) %>
</small>
</div>

<div>
<span class="text-medium">
<%= link_to_other_resource_versions(result_versions_path(result)) %>
<%= link_to_other_resource_versions(result, result_versions_path(result)) %>
</span>
</div>
</div>
Expand Down
@@ -1,8 +1,8 @@
<div class="card--list__item">
<%= icon "actions", class: "card--list__icon", role: "img", remove_icon_class: true %>
<%= icon "actions", class: "card--list__icon", role: "img", "aria-hidden": true, remove_icon_class: true %>
<%= link_to resource_locator(result).path, class: "card--list__text card__link card__link--block" do %>
<h4 class="card--list__heading">
<h4 class="card--list__heading heading6">
<%= translated_attribute(result.title) %>
</h4>

Expand Down
2 changes: 1 addition & 1 deletion decidim-accountability/config/locales/en.yml
Expand Up @@ -216,7 +216,7 @@ en:
results: Results
participatory_spaces:
highlighted_results:
see_all: See all (%{count})
see_all: See all results (%{count})
resource_links:
included_projects:
result_project: Projects included in this result
Expand Down
6 changes: 3 additions & 3 deletions decidim-accountability/spec/system/explore_results_spec.rb
Expand Up @@ -31,7 +31,7 @@
end

it "shows progress" do
expect(page).to have_content("GLOBAL EXECUTION STATUS")
expect(page).to have_content("Global execution status")
expect(page).to have_selector(".progress-figure")
end

Expand Down Expand Up @@ -112,13 +112,13 @@
end

it "does not show version data" do
expect(page).not_to have_content("VERSION")
expect(page).not_to have_content("Version number")
end
end

context "when it has some versions" do
it "does shows version data" do
expect(page).to have_content("VERSION 1")
expect(page).to have_content("Version number 1")
end
end

Expand Down
Expand Up @@ -63,7 +63,7 @@
click_link "see other versions"

within ".card--list__item:last-child" do
click_link("Version 2")
first(:link, "Version 2").click
end
end

Expand Down

0 comments on commit de2e5e7

Please sign in to comment.