Conversation
…ecifying accepted forms of identification
|
|
||
| .usa-alert__body { | ||
| ul { | ||
| margin-bottom: 0px; |
There was a problem hiding this comment.
I'm not sure what the standard pattern is but do we use these USWDS class for things like this?
There was a problem hiding this comment.
Yes I'd personally prefer that we use a margin utility class on the rendered list rather than making this default styling for all alerts.
i.e. <ul class="margin-bottom-0">
There was a problem hiding this comment.
I don't think I understand the rails component system enough but is this going to affect other usages of usa-alert__body elsewhere?
There was a problem hiding this comment.
Yes it would, since the stylesheets are loaded on every page.
A few thoughts:
- Personally, I feel that alert content should be concise and we should try to avoid long text, particularly if it's going to be announced to assistive technology as status text. Regardless of whether we have the option here, my thinking is that we can disincentivize it by making it cumbersome to style long-form content 😅
- There may be use-cases for lists followed by other content in an alert, where we would want the margin
- Any additional styling to design system components beyond what's provided through the base design system could create confusion for developers who are familiar with USWDS styles but not our ad hoc extensions
- Maybe it's reasonable to have a global styling to remove the margin from the last child in the alert body, broadly speaking? I might be more agreeable to something like that.
For example:
.usa-alert__body > :last-child {
margin-bottom: 0;
}There was a problem hiding this comment.
This comment suggests the full design system might not be imported so that might be necessary (unless it's an outdated comment).
.usa-alert__body > :last-child {
@include u-margin-bottom(0);
}There was a problem hiding this comment.
We do. Let me play around and see if one can work. I think I'd have to add that class into the translation files though, and I'm not sure I want to do make that content even messier.
There was a problem hiding this comment.
This comment suggests the full design system might not be imported so that might be necessary (unless it's an outdated comment).
That stylesheet is only used for email messages.
| <%= render PageHeadingComponent.new.with_content(t('in_person_proofing.headings.state_id')) %> | ||
| <% end %> | ||
|
|
||
| <%= render AlertComponent.new( |
There was a problem hiding this comment.
question for my understanding - are we able to know if a user's id is expired or is this an alert that everyone sees when they arrive on this page?
There was a problem hiding this comment.
I believe everyone sees it
There was a problem hiding this comment.
@svalexander Great question! This alert is static. It's an attempt to help users understand what kinds of IDs are acceptable, so it should display regardless of the status of state id.
allthesignals
left a comment
There was a problem hiding this comment.
Just some minor questions
|
|
||
| .usa-alert__body { | ||
| ul { | ||
| margin-bottom: 0px; |
There was a problem hiding this comment.
I don't think I understand the rails component system enough but is this going to affect other usages of usa-alert__body elsewhere?
So it will affect any usage of an unordered list element inside of an element with the `.usa-alert__body' class. Which I think is reasonably specific, but maybe not. Should I ping some other folks @allthesignals ? |
|
@allthesignals I opted to remove the change to the stylesheet to prevent changes elsewhere in the site. This did end up putting more info into the HTML in the translation files though. |
Cool, I think that's fine. I think it's probably a "less surprising" approach: we use USWDS styling, that margin class is a well-documented thing, and no one will find this adhoc Thanks!! |
|
Also, (sorry to belabor it) another approach might be to change AlertComponent to accept a block... <% AlertComponent.new(**stuff).with_content(t('in_person_proofing.body.state_id.alert_message')) do %>
<ul>
<% t('in_person_proofing.body.state_id.alert.forms_of_id').each do |type_of_id| %>
<li>
<%= type_of_id %>
</li>
<% end %>
</ul>
<% end %>And |
Beautious. This is better than including HTML in the translation files IMO. Thanks! |
| click_button t('idv.buttons.change_state_id_label') | ||
| expect(page).to have_content(t('in_person_proofing.headings.update_state_id')) | ||
| fill_in t('in_person_proofing.form.state_id.first_name'), with: 'bad first name' | ||
| binding.pry |
There was a problem hiding this comment.
Remove this line.
| binding.pry |
| de sécurité sociale. | ||
| state_id: | ||
| alert_message: Votre carte d’identité délivrée par l’État ne doit pas être | ||
| périmée. Les pièces d’identité acceptées sont |
There was a problem hiding this comment.
We might need to add a colon here after "sont" @JackRyan1989
| verify_step_enter_pii: Enter your name, date of birth, state-issued ID number, | ||
| address and Social Security number. | ||
| state_id: | ||
| alert_message: 'Your state-issued ID must not be expired. Accepted forms of ID are:' |
There was a problem hiding this comment.
The alert shows below the hint text on the Figma file, but above the hint text on the content file. I would ask Allison which one is the correct placement @JackRyan1989
| verify_step_enter_pii: Enter your name, date of birth, state-issued ID number, | ||
| address and Social Security number. | ||
| state_id: | ||
| alert_message: 'Your state-issued ID must not be expired. Accepted forms of ID are:' |


🎫 Ticket
🛠 Summary of changes
tags within the
usa-alert__bodyclass📜 Testing Plan
Provide a checklist of steps to confirm the changes.
👀 Screenshots
Quick run thru with a screen reader:
After:
alert_sc_runthru.mov