Skip to content

Commit

Permalink
Changed div to h1 in stepper section header subtitle, changed span in…
Browse files Browse the repository at this point in the history
… stepper from sections to selfie, set the name and fieldset of table filter, added type email to button component
  • Loading branch information
TomasThurMg committed Oct 28, 2022
1 parent 7ec2ec2 commit 0857046
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion app/views/komponenty/examples/button.njk
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"text": "E-mailová adresa"
},
"id": "input-email",
"name": "email"
"name": "email",
"type": "email"
}) }}
{{ idskButton({
"text": "Uložiť a pokračovať"
Expand Down
4 changes: 2 additions & 2 deletions src/idsk/components/stepper/stepper.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Stepper.prototype.initControls = function () {
// Create "Zobraziť všetko" button and set attributes
this.$openAllButton = document.createElement('button')
this.$openAllButton.setAttribute('type', 'button')
this.$openAllButton.innerHTML = $accordionControls.dataset.line1 + ' <span class="govuk-visually-hidden">sections</span>'
this.$openAllButton.innerHTML = $accordionControls.dataset.line1 + ' <span class="govuk-visually-hidden">sekcie</span>'
this.$openAllButton.setAttribute('class', this.$openAllClass)
this.$openAllButton.setAttribute('aria-expanded', 'false')
this.$openAllButton.setAttribute('type', 'button')
Expand Down Expand Up @@ -235,7 +235,7 @@ Stepper.prototype.updateOpenAllButton = function ($expanded) {

if ($accordionControls) {
var $newButtonText = $expanded ? $accordionControls.dataset.line2 : $accordionControls.dataset.line1
$newButtonText += '<span class="govuk-visually-hidden"> sections</span>'
$newButtonText += '<span class="govuk-visually-hidden">sekcie</span>'
this.$openAllButton.setAttribute('aria-expanded', $expanded)
this.$openAllButton.innerHTML = $newButtonText
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/idsk/components/stepper/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
{% if item %}
{% if item.heading.isTitle %}
<div class="idsk-stepper__section-title">
<div class="idsk-stepper__section-header idsk-stepper__section-subtitle">
<h1 class="idsk-stepper__section-header idsk-stepper__section-subtitle">
<p class="govuk-heading-m">{{item.heading.text}}
</p>
</div>
</h1>
</div>
{% else %}
{% set counter = counter + 1 %}
Expand Down
6 changes: 4 additions & 2 deletions src/idsk/components/table/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
<div class="idsk-table__heading-extended">
<div class="govuk-form-group">
<div class="govuk-radios govuk-radios--inline">
<fieldset class="govuk-fieldset">
{% for radio in params.radioOptions.slice(0, 2) %}
<div class="govuk-radios__item">
<input class="govuk-radios__input" type="radio" name="radio-{{ params.uniqueId + '-' + loop.index }}" id="radio-{{ params.uniqueId + '-' + loop.index }}" value="{{ radio.value }}" {% if loop.index == 1 %}checked=""{% endif %}>
<label class="govuk-label govuk-radios__label" for="radio-{{ params.uniqueId + '-' + loop.index }}">{{ radio.title }}</label>
<input class="govuk-radios__input" type="radio" name="radio-{{ params.uniqueId }}" id="radio-{{ params.uniqueId + '-' + loop.index }}" value="{{ radio.value }}" {% if loop.index == 1 %}checked=""{% endif %}>
<label class="govuk-label govuk-radios__label" for="radio-{{ params.uniqueId }}">{{ radio.title }}</label>
</div>
</fieldset>
{% endfor %}
</div>
</div>
Expand Down

0 comments on commit 0857046

Please sign in to comment.