Commit 5fd89961 authored by Steffen van Bergerem's avatar Steffen van Bergerem
Browse files

Use aria-labelledby for conversations

parent 48195440
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -7,8 +7,16 @@
        = owner_image_tag(:thumb_small)
      .media-body
        = form_for [conversation, Message.new], html: {class: "control-group"} do |message|
          = message.text_area :text, rows: 5, tabindex: 1, class: "form-control form-group"
          = message.submit t("conversations.show.reply").capitalize,
          .form-group
            %label#messageLabel.sr-only{for: "message_text"}
              = t("conversations.new.message")
            = message.text_area :text,
                                rows:     5,
                                tabindex: 1,
                                class:    "form-control form-group",
                                aria:     {labelledby: "messageLabel"}

          = message.submit t("conversations.show.reply"),
                            "data-disable-with" => t("conversations.show.replying"),
                            class: "btn btn-primary pull-right", tabindex: 2
          .clearfix
+14 −6
Original line number Diff line number Diff line
.container-fluid
  = form_for Conversation.new, html: {class: "form-horizontal form_do_not_clear"}, remote: true do |conversation|
    .form-group
      %label{ for: 'contact_ids' }
        = t('.to')
      %label#toLabel{for: "contact_ids"}
        = t(".to")
      = text_field_tag "contact_autocomplete", nil, class: "form-control"
    .form-group
      %label{ for: 'conversation_subject' }
        = t('.subject')
      = conversation.text_field :subject, class: 'input-block-level form-control'
      %label#subjectLabel{for: "conversation_subject"}
        = t(".subject")
      = conversation.text_field :subject,
                                class: "input-block-level form-control",
                                aria:  {labelledby: "subjectLabel"}
    .form-group
      = text_area_tag "conversation[text]", '', rows: 5, class: 'input-block-level form-control'
      %label#messageLabel.sr-only{for: "conversation_text"}
        = t(".message")
      = text_area_tag "conversation[text]",
                      "",
                      rows:  5,
                      class: "input-block-level form-control",
                      aria:  {labelledby: "messageLabel"}
    .form-group
      = conversation.submit t('.send'), 'data-disable-with' => t('.sending'), class: 'btn btn-primary pull-right'
+1 −0
Original line number Diff line number Diff line
@@ -352,6 +352,7 @@ en:
      to: "To"
      subject: "Subject"
      subject_default: "No subject"
      message: "Message"
      send: "Send"
      sending: "Sending..."
      abandon_changes: "Abandon changes?"