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

usagov-2120-page-region-attribute: update logic to remove role attrib… #2120

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,23 @@
{{ attach_library('uswds_paragraph_components/uswds-alerts') }}

{# Prints div with classes, and content without Width and Background. #}
<div{{ attributes.addClass(classes) }} role="region" aria-label={{ alert_status }}>
{% if alert_status %}
<div{{ attributes.addClass(classes) }} role="region" aria-label={{ alert_status }}>
{% else %}
<div{{ attributes.addClass(classes) }}>
{% endif %}
<div class="usa-alert__body">
{% if 'usa-alert--no-icon' not in classes %}
<span class="usa-alert__a11y-label visually-hidden" id="usa-alert--1__a11y-label">
<svg role="img" aria-label={{ alert_status }}>
<title aria-labelledby="usa-alert--1__heading">{{ alert_status }}</title>
</svg>
<span class="usa-alert__a11y-label visually-hidden" id="usa-alert--1__a11y-label">
<svg role="img" aria-label={{ alert_status }}>
<title aria-labelledby="usa-alert--1__heading">{{ alert_status }}</title>
</svg>
</span>
{% endif %}
{% endif %}
{% if not paragraph.field_alert_title.isempty %}
<div id="usa-alert--1__heading">
<h2 class="usa-alert__heading">{{ content.field_alert_title }}</h2>
</div>
<div id="usa-alert--1__heading">
<h2 class="usa-alert__heading">{{ content.field_alert_title }}</h2>
</div>
{% endif %}
{{ content.field_alert_body }}
</div>
Expand Down
Loading