slovensko-digital / navody.digital

https://navody.digital
European Union Public License 1.2
53 stars 26 forks source link

Kompononet > Notification subscription group (1.3.1, 3.3.2) #625

Open athelas64 opened 1 year ago

athelas64 commented 1 year ago

Radion buttony nie sú vo fieldsete, fieldset nemá definovanú legendu. Nedajú sa teda ovládať pomocou klávesnice a používateľovi nie sú komunikované správne informácie.

Riešenie: doplniť fieldset a legendu:

<fieldset class="govuk-fieldset">
  <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
    <h1 class="govuk-fieldset__heading">
      Legend as page heading
    </h1>
  </legend>
</fieldset>

https://design-system.service.gov.uk/components/fieldset/

Vizuál sa nezmení: fieldset_legend

Opravený kód (celý blok):

<fieldset class="govuk-fieldset">
<div class="notification-subscription-group">
  <legend class="govuk-fieldset__legend govuk-fieldset__legend--l">
  <h3 class="govuk-heading-m">Aktivujte si aj upozornenia na email, aby ste na nič nezabudli.</h3>
</legend>
  <form id="new_subscription_notification_group" novalidate="novalidate" action="/notifikacie" accept-charset="UTF-8" data-remote="true" method="post"><input type="hidden" name="authenticity_token" value="rHQRwHdLB3GmyhhV+esNtGe53mwa8J80uHnCfUWHJTvchP/TWXI5fYzpW0U0E42H3/Qq964KxNVjeyuW1hoAqA==" autocomplete="off">
  <div class="govuk-form-group ">

      <div class="govuk-checkboxes">
          <div class="govuk-checkboxes__item">
            <input type="checkbox" name="notification_subscription_group[selected_subscription_types][]" id="notification_subscription_group_0" value="VoteSubscription" class="govuk-checkboxes__input">
            <label class="govuk-label govuk-checkboxes__label govuk-label--s" for="notification_subscription_group_0">Chcem dostávať upozornenia k voľbám</label>
            <input type="hidden" name="notification_subscription_group[subscription_types][]" id="notification_subscription_group_subscription_types_" value="VoteSubscription" autocomplete="off">
            <span class="govuk-hint govuk-checkboxes__hint">Zašleme Vám správu s praktickými informáciami pred týmito a ďaľšími voľbami.</span>
          </div>
          <div class="govuk-checkboxes__item">
            <input type="checkbox" name="notification_subscription_group[selected_subscription_types][]" id="notification_subscription_group_1" value="NewsletterSubscription" class="govuk-checkboxes__input">
            <label class="govuk-label govuk-checkboxes__label govuk-label--s" for="notification_subscription_group_1">Chcem odoberať pravidelné novinky Návody.Digital</label>
            <input type="hidden" name="notification_subscription_group[subscription_types][]" id="notification_subscription_group_subscription_types_" value="NewsletterSubscription" autocomplete="off">
            <span class="govuk-hint govuk-checkboxes__hint">Ak chcete vedieť o ďalších zlepšovákoch, ktoré pripravujeme, zvoľte si túto možnosť. Neposielame žiadny spam, bude to užitočné a len raz za čas.</span>
          </div>
      </div>
  </div>

    <input type="hidden" name="notification_subscription_group[email]" id="notification_subscription_group_email" value="radoslavdurac01@gmail.com" autocomplete="off">

  <div class="govuk-form-group">
    <input type="submit" name="commit" value="Chcem dostávať tieto notifikácie" class="govuk-button" data-disable-with="Chcem dostávať tieto notifikácie">
  </div>

  <div class="more_1696699541"><style media="screen">.more_1696699541 {display:none;}</style><label for="notification_subscription_group_more">If you are a human, ignore this field</label><input type="text" name="notification_subscription_group[more]" id="notification_subscription_group_more" autocomplete="off" tabindex="-1"><input type="hidden" name="spinner" value="28a286a3b5d6a1ada0be67c010096fb3" autocomplete="off"></div>
</form>
</div>
  </fieldset>