-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into VAGOV-0000-update-va-web
- Loading branch information
Showing
5 changed files
with
85 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
docroot/themes/custom/vagovadmin/templates/layout/fieldset.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{# | ||
/** | ||
* @file | ||
* Theme override for a fieldset element and its children. | ||
* | ||
* Available variables: | ||
* - attributes: HTML attributes for the fieldset element. | ||
* - errors: (optional) Any errors for this fieldset element, may not be set. | ||
* - required: Boolean indicating whether the fieldeset element is required. | ||
* - legend: The legend element containing the following properties: | ||
* - title: Title of the fieldset, intended for use as the text of the legend. | ||
* - attributes: HTML attributes to apply to the legend. | ||
* - description: The description element containing the following properties: | ||
* - content: The description content of the fieldset. | ||
* - attributes: HTML attributes to apply to the description container. | ||
* - children: The rendered child elements of the fieldset. | ||
* - prefix: The content to add before the fieldset children. | ||
* - suffix: The content to add after the fieldset children. | ||
* | ||
* @see template_preprocess_fieldset() | ||
*/ | ||
#} | ||
{% | ||
set classes = [ | ||
'js-form-item', | ||
'form-item', | ||
'js-form-wrapper', | ||
'form-wrapper', | ||
] | ||
%} | ||
<fieldset{{attributes.addClass(classes)}}> | ||
{% | ||
set legend_span_classes = [ | ||
'fieldset-legend', | ||
required ? 'js-form-required', | ||
required ? 'form-required', | ||
] | ||
%} | ||
{# Always wrap fieldset legends in a <span> for CSS positioning. #} | ||
<legend{{legend.attributes}}> | ||
<span{{legend_span.attributes.addClass(legend_span_classes)}}>{{ legend.title }}</span> | ||
</legend> | ||
{% if description.content %} | ||
<div{{description.attributes.addClass('description')}}>{{ description.content }}</div> | ||
{% endif %} | ||
|
||
<div class="fieldset-wrapper"> | ||
{% if errors %} | ||
<div class="form-item--error-message"> | ||
<strong>{{ errors }}</strong> | ||
</div> | ||
{% endif %} | ||
{% if prefix %} | ||
<span class="field-prefix">{{ prefix }}</span> | ||
{% endif %} | ||
{{ children }} | ||
{% if suffix %} | ||
<span class="field-suffix">{{ suffix }}</span> | ||
{% endif %} | ||
|
||
</div> | ||
</fieldset> |
da4b7bf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Test Failed:
va/tests/accessibility