Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login modal RGAA compliance #1234

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion decidim-core/app/helpers/decidim/modal_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def decidim_modal(opts = {}, &)
"&times".html_safe,
type: :button,
data: { dialog_close: opts[:id] || "", dialog_closable: "" },
"aria-label": t("close_modal", scope: "decidim.shared.confirm_modal")
"aria-label": t("close_modal", scope: "decidim.shared.confirm_modal"),
"aria-describedby": opts[:id] || ""
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
<% end %>
</div>
<%- if current_organization.sign_in_enabled? %>
<span class="login__omniauth-separator"><%= t(".or") %></span>
<p class="login__omniauth-separator"><%= t(".or") %></p>
<%- end %>
<% end %>
7 changes: 5 additions & 2 deletions decidim-core/app/views/decidim/shared/_login_modal.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
<% end %>

<div class="form__wrapper">
<%= f.email_field :email, autocomplete: "email", placeholder: t("placeholder_email", scope: "decidim.devise.shared") %>
<div>
<p><%= t(".required_fields") %></p>
</div>
<%= f.email_field :email, autocomplete: "email", placeholder: t("placeholder_email", scope: "decidim.devise.shared"), required: true %>

<%= render partial: "decidim/account/password_fields", locals: { form: f } %>
</div>
Expand All @@ -40,7 +43,7 @@

<% if current_organization.sign_in_enabled? %>
<div data-dialog-actions>
<button type="button" class="button button__lg button__transparent-secondary" data-dialog-close="loginModal">
<button type="button" class="button button__lg button__transparent-secondary" data-dialog-close="loginModal" aria-describedby="loginModal">
<%= t("cancel", scope: "decidim.admin.actions") %>
</button>
<button type="submit" class="button button__lg button__secondary">
Expand Down
1 change: 1 addition & 0 deletions decidim-core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1663,6 +1663,7 @@ en:
log_in_before_follow: Please log in before performing this action
login_modal:
please_log_in: Please log in
required_fields: All fields are required
sign_up: Create an account
mentions_modal:
remove_recipient: Remove recipient %{name}
Expand Down
Loading